Code question about mycanonifyid() in lib/auth_unix.c
Thomas Jarosch
thomas.jarosch at intra2net.com
Wed Aug 20 03:42:38 EDT 2008
Hello Ken,
I've noticed a little piece of code and wanted to ask about the original idea
behind it. In mycanconifyid() is a special code path if the identifier begins
with "group:". If so, we call getgrnam() and then copy the resulting group
name into the buffer.
I'm wondering why the code does this?
F.e. could getgrnam() return a group alias name when querying an LDAP server?
Either the group name can change (so we need to check the buffer as in the
attached cyrus-imapd-protect-buffer.patch) or it will never change and we can
drop the strcpy() like in the cyrus-imapd-remove-unused-strcpy.patch.
Cheers,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20080820/1f077d95/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus-imapd-protect-buffer.patch
Type: text/x-patch
Size: 502 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20080820/1f077d95/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyurs-imapd-remove-unused-strcpy.patch
Type: text/x-patch
Size: 440 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20080820/1f077d95/attachment-0001.bin
More information about the Cyrus-devel
mailing list