In the event somebody may find this useful, attached is a patch to HEAD to allow a simple form of attribute inheritance.
It has also been contributed as ITS#5659.. (the patch in ftp /incoming is newer than the one in the tarball)
If anyone wants to try it out, please do and let me know if there are any issues..
(this is a simple change to a demo overlay Howard Chu did some time ago, which is not built by default)
Brett @Google wrote:
In the event somebody may find this useful, attached is a patch to HEAD to allow a simple form of attribute inheritance.
It has also been contributed as ITS#5659.. (the patch in ftp /incoming is newer than the one in the tarball)
If anyone wants to try it out, please do and let me know if there are any issues..
(this is a simple change to a demo overlay Howard Chu did some time ago, which is not built by default)
Pretty good. Just a couple points - it's not necessary to strdup c->argv[] before processing it. Since this overlay is the final consumer of the argv, there's no reason to preserve it. Trash it at will. strtok should probably be used instead of strtok_r in your config code since strtok_r is not universal and the code is single-threaded already.
Also, strcat/strncat are never to be used, use lutil_strcopy/strncopy instead.
ci_ad_len should probably be ci_ad_num; "_len" is always used for the length of strings, "_num" to count anything else.
On Sat, Sep 6, 2008 at 4:01 AM, Howard Chu hyc@symas.com wrote:
Pretty good. Just a couple points - it's not necessary to strdup c->argv[] before processing it. Since this overlay is the final consumer of the argv, there's no reason to preserve it. Trash it at will. strtok should probably be used instead of strtok_r in your config code since strtok_r is not universal and the code is single-threaded already.
Also, strcat/strncat are never to be used, use lutil_strcopy/strncopy instead.
ci_ad_len should probably be ci_ad_num; "_len" is always used for the length of strings, "_num" to count anything else.
Have made suggested changes, thanks :)
New diff is attached...
Cheers Brett
i've attached a slightly newer file for posterty, as the /incoming folder on the anonymous ftp server is saying "device full"
(collect structures match longer dn's first, which helps if collect-ing from multiple levels of structure)
On Sat, Sep 6, 2008 at 1:49 AM, Brett @Google brett.maxfield@gmail.com wrote:
In the event somebody may find this useful, attached is a patch to HEAD to allow a simple form of attribute inheritance.
It has also been contributed as ITS#5659.. (the patch in ftp /incoming is newer than the one in the tarball)
If anyone wants to try it out, please do and let me know if there are any issues..
(this is a simple change to a demo overlay Howard Chu did some time ago, which is not built by default)
Brett @Google wrote:
i've attached a slightly newer file for posterty, as the /incoming folder on the anonymous ftp server is saying "device full"
I'm committing a revised version of this patch. You used C++ style comments, which are never to be used since slapd is pure C code. You used strlen, which is also discouraged in slapd code since struct bervals already record the length of the attached data. plus a few other cleanups...
(collect structures match longer dn's first, which helps if collect-ing from multiple levels of structure)
On Sat, Sep 6, 2008 at 1:49 AM, Brett @Googlebrett.maxfield@gmail.com wrote:
In the event somebody may find this useful, attached is a patch to HEAD to allow a simple form of attribute inheritance.
It has also been contributed as ITS#5659.. (the patch in ftp /incoming is newer than the one in the tarball)
If anyone wants to try it out, please do and let me know if there are any issues..
(this is a simple change to a demo overlay Howard Chu did some time ago, which is not built by default)