[Dovecot] New generic userdb lookup api

Sascha Wilde wilde at intevation.de
Mon Oct 27 20:36:42 EET 2008


Ok, as discussed I have made some changes (hopefully improvements) in
the new "auth-master" API for userdb requests...

Sascha Wilde <wilde at intevation.de> writes:
> Timo Sirainen <tss at iki.fi> writes:
[...]
>> 3. Would be nice to get rid of the getenv()s :) The MAIL_CHROOT handling
>> could be moved to deliver (use it if reply->chroot == NULL). The debug
>> could be a parameter to auth_master_init().
>
> You are right, and as I moved/left most of the env stuff in
> deliver/auth-client anyway it is only consequent to handle those two the
> same -- I'll make this change.

Done, the last getenv()s have been moved to the deliver code.

>> 4. You're leaking memory.
>
> Um, yes. *blush* -- at least I added the free for the connection shortly
> after my announcement...  ;-)
>
>> Cleanest fix would be to add pool_t pool parameter to
>> auth_master_user_lookup() and allocate memory only from it

Done.  

I thought for a moment of putting the pool (de)allocation into
auth_master_init and auth_master_deinit -- but that turned out to be to
quirky, especially with the existing deliver code...

>> (also p_array_init(&reply->extra_fields) would be cleaner to do inside
>> the lookup code than require it to be done externally).

Done, too.

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: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20081027/2a7d3570/attachment.bin 


More information about the dovecot mailing list