Paul J Stevens <[EMAIL PROTECTED]> said:

> Initialisation of the char** values seems a bit rough, esp in the
> __auth_get_ function which are the real workhorses of this module.
> I don't see any allocation going on there at all, which explains some
> of the trailing garbage I get from calls like auth_get_userid.

Would you believe that authldap.c was the first large piece of C I ever
wrote? The LDAP part was easy, because I'm been using LDAP from PHP for
years. Pointers and malloc only barely made sense, and I spent most of my
debugging time adding and removing * and & until things worked. Hence lots
of field_t, which turns out to be a static buffer of 1024 characters in
dbmail.h. The code should probably be given a security read through,
although the likelihood of somebody 0wning your LDAP server just to blow
up DBMail is pretty slim...

> Also, (Aaron) why the usage of goto??? Does this come from samba as well :-)

Depends where you mean. In a number of places I'm using it for a single
cleanup sequence at the bottom of a function. In a few other places, I'm
probably using it in the most maximally horrible ways possible. Feel free
to clean it up!

Aaron

-- 

Reply via email to