[Dovecot] [patch] 'c' and 'd' in setacl

Sascha Wilde wilde at intevation.de
Mon Feb 9 13:36:10 EET 2009


Hi Timo,

thanks for your reply!

Timo Sirainen <tss at iki.fi> writes:
> On Fri, 2009-02-06 at 12:29 +0100, Sascha Wilde wrote:
>> I just recognized that the new imap-acl plugin in dovecot 1.2 does not
>> know the obsolete rights 'd' and 'c' when setting.  
> ..
>> [0] I don't like the use of static indexes witch imap_acl_letter_map but
>>     currently I wasn't able to decide on a more elegant solution.
>
> How about instead of
>
> array_append(rights, &imap_acl_letter_map[8].name
>
> something like:
>
> str = MAIL_ACL_CREATE;
> array_append(rights, &str

I gave it a try in the attached patch.  Actually I considered that my
self but I'm (still) not sure if this is 100% legal according to the
standard.

Partly this is because I haven't fully understood which information from
the array "rights" is retained outside the function (by means of
"rights_r").  Partly its because I'm not sure if it's ok to refer to the
immediate string value used to initialize an automatic variable outside
the function.

In case you are sure the attached version is kosher I would indeed like
it better than the first.

cheers
sascha
-- 
Sascha Wilde                                          OpenPGP key: 4BB86568
http://www.intevation.de/~wilde/                  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück; AG Osnabrück, HR B 18998
Geschäftsführer:   Frank Koormann,  Bernhard Reiter,  Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 1199 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20090209/c5f91509/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20090209/c5f91509/attachment-0001.bin 


More information about the dovecot mailing list