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

Sascha Wilde <[EMAIL PROTECTED]> writes:
> Timo Sirainen <[EMAIL PROTECTED]> 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

Attachment: pgpvwa2nMJGw7.pgp
Description: PGP signature

Reply via email to