[Dovecot] auth protocol, buffers
Hello Timo,
I'm curious about 2 points (I'm using alpha2 but these are general questions) :
Background :
. I connect to dovecot-1.0.alpha2 through thunderbird . I use ldap pass/userdb and PLAIN mech . I've only got one auth block in dovecot.conf (all pass/userdb/mech except ldap/PLAIN are commented)
- I notice that, for one thunderbird connection trial, imap-login issues 2 AUTH messages. Why ? What info does the "resp=" hold the second time ? It goes like this :
Info: Dovecot v1.0.alpha2 starting up
Info: auth(default): client in: AUTH 1 PLAIN service=IMAP lip=xxx.xxx.xxx.xxx rip=xxx.xxx.xxx.xxx
Info: auth(default): client out: CONT 1
Info: auth(default): client in: CONT 1 AGRvdmV0ZXN0AGZvbw==
Info: auth(default): ldap(dovetest,xxx.xxx.xxx.xxx): base=ou=personnes, dc=pasteur, dc=fr scope=subtree filter=(&(objectClass=posixAccount)(uid=dovetest)) fields=uid,userPassword
Info: auth(default): ldap(dovetest,xxx.xxx.xxx.xxx): userPassword(password)={CRYPT}sa8ufSVwLUHVU uid(user)=dovetest
Info: auth(default): client out: FAIL 1 user=dovetest
Info: auth(default): client in: AUTH 2 PLAIN service=IMAP lip=xxx.xxx.xxx.xxx rip=xxx.xxx.xxx.xxx resp=AGRvdmV0ZXN0AGZvbw==
Info: auth(default): ldap(dovetest,157.99.64.42): base=ou=personnes, dc=pasteur, dc=fr scope=subtree filter=(&(objectClass=posixAccount)(uid=dovetest)) fields=uid,userPassword
Info: auth(default): ldap(dovetest,157.99.64.42): userPassword(password)={CRYPT}sa8ufSVwLUHVU uid(user)=dovetest
dovecot: Sep 20 17:58:27 Info: auth(default): client out: FAIL 2 user=dovetest
- Which buffer/string handling function (among those in your lib) should I use to safely allocate a string and/or copy a string into another ? (instead of using str[n|l]cpy for instance) ?
Thank you.
-- Thomas Hummel | Institut Pasteur hummel@pasteur.fr | Pôle informatique - systèmes et réseau
On Tue, 2005-09-20 at 19:29 +0200, Thomas Hummel wrote:
Hello Timo,
I'm curious about 2 points (I'm using alpha2 but these are general questions) :
Background :
. I connect to dovecot-1.0.alpha2 through thunderbird . I use ldap pass/userdb and PLAIN mech . I've only got one auth block in dovecot.conf (all pass/userdb/mech except ldap/PLAIN are commented)
- I notice that, for one thunderbird connection trial, imap-login issues 2 AUTH messages. Why ? What info does the "resp=" hold the second time ? It goes like this :
Have you checked if it's just because Thunderbird sends it twice? It looks like it first tries with AUTHENTICATE PLAIN command, and after that with LOGIN command. The resp= parameter is the "initial response", same as in the above CONT's parameter. And it contains the username and password base64 encoded. Internally Dovecot converts LOGIN command to PLAIN authentication with the initial response set.
- Which buffer/string handling function (among those in your lib) should I use to safely allocate a string and/or copy a string into another ? (instead of using str[n|l]cpy for instance) ?
Depends on what you want to do.. string_t type is useful if you want to build the string from many parts (lib/str.h). Then there are also other commands such as *_strdup_printf() in lib/strfuncs.h.
participants (2)
-
Thomas Hummel
-
Timo Sirainen