[Dovecot] ntlm auth / usernames with white spaces
Hi, we experienced some problems with white spaces in usernames (this was NOT our idea) authenticated bei dovecots ntlmhelper I wrote a little patch fixing this, if you would like. patch applies on 2.1.7 and 2.1.8 (tested those) diff -up ./src/auth/mech-winbind.c.username ./src/auth/mech-winbind.c --- ./src/auth/mech-winbind.c.username 2012-07-27 09:52:33.422553807 +0200 +++ ./src/auth/mech-winbind.c 2012-07-27 14:23:03.718619388 +0200 @@ -239,8 +239,16 @@ do_auth_continue(struct auth_request *au return HR_FAIL; } else if (strcmp(token[0], "AF") == 0) { const char *user, *p, *error; + int ti=1; + + if(gss_spnego) + ti=2; + /* some braindead administrators like spaces in usernames */ + user = token[ti]; + while(token[++ti]){ + user = t_strconcat(user, " ", token[ti], NULL); + } - user = gss_spnego ? token[2] : token[1]; i_assert(user != NULL); p = strchr(user, '\\');
On 27.7.2012, at 17.32, Matthias Lay wrote:
we experienced some problems with white spaces in usernames (this was NOT our idea) authenticated bei dovecots ntlmhelper
I wrote a little patch fixing this, if you would like.
patch applies on 2.1.7 and 2.1.8 (tested those)
Does this simpler patch also work?
works the same way! at least for ntlm but should do the same for spnego.
thx. didnt see your strarray join function.
On Tue, 2012-07-31 at 22:10 +0300, Timo Sirainen wrote:
On 27.7.2012, at 17.32, Matthias Lay wrote:
we experienced some problems with white spaces in usernames (this was NOT our idea) authenticated bei dovecots ntlmhelper
I wrote a little patch fixing this, if you would like.
patch applies on 2.1.7 and 2.1.8 (tested those)
Does this simpler patch also work?
participants (2)
-
Matthias Lay
-
Timo Sirainen