From 04005e5205eb7fc4aa355d6901c77bfdf93c1116 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Thu, 14 Jun 2012 10:04:25 +0200 Subject: [PATCH] Allow backslash as the domain/user separator For NTLM users, the domain and user names may be separated by a + or a \\ as pointed out by mrac33: (http://sourceforge.net/tracker/index.php?func=detail&aid=3532108&group_id=68910&atid=522791) For compatibility reasons, the _ separator is still retained. Thanks to mrac33 for reporting and fixing this bug. --- log.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/log.c b/log.c index bcc1aed..6bc1b68 100644 --- a/log.c +++ b/log.c @@ -1378,11 +1378,7 @@ int main(int argc,char *argv[]) } else { strlow(user); if(NtlmUserFormat == NTLMUSERFORMAT_USER) { - if((str = strchr(user,'_')) != 0) { - strcpy(warea,str+1); - strcpy(user,warea); - } - if((str = strchr(user,'+')) != 0) { + if ((str=strchr(user,'+'))!=NULL || (str=strchr(user,'\\'))!=NULL || (str=strchr(user,'_'))!=NULL) { strcpy(warea,str+1); strcpy(user,warea); } -- 2.47.2