--------------------- PatchSet 4134 Date: 2002/05/17 17:08:00 Author: serassio Branch: nt-2_5 Tag: (none) Log: Fixed a nt_auth bug in the group membership check when using -D parameter (default NT domain) Members: src/auth/basic/helpers/win32_locallogon/valid.c:1.1.38.3->1.1.38.4 Index: squid/src/auth/basic/helpers/win32_locallogon/valid.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/basic/helpers/win32_locallogon/Attic/valid.c,v retrieving revision 1.1.38.3 retrieving revision 1.1.38.4 diff -u -r1.1.38.3 -r1.1.38.4 --- squid/src/auth/basic/helpers/win32_locallogon/valid.c 27 Apr 2002 12:55:22 -0000 1.1.38.3 +++ squid/src/auth/basic/helpers/win32_locallogon/valid.c 17 May 2002 17:08:00 -0000 1.1.38.4 @@ -124,20 +124,28 @@ char NTDomain[256]; char *domain_qualify; char DomainUser[256]; + char User[256]; strcpy(NTDomain, UserName); if ((domain_qualify = strchr(NTDomain, '\\')) == NULL) { - strcpy(DomainUser, NTDomain); + strcpy(User, NTDomain); strcpy(NTDomain, Default_NTDomain); } else { - strcpy(DomainUser, domain_qualify + 1); + strcpy(User, domain_qualify + 1); domain_qualify[0] = '\0'; } /* Log the client on to the local computer. */ - if (!SSPLogonUser(DomainUser, Password, NTDomain)) { + if (!SSPLogonUser(User, Password, NTDomain)) { result = NTV_LOGON_ERROR; } else { result = NTV_NO_ERROR; + if (strcmp(NTDomain, NTV_DEFAULT_DOMAIN) == 0) + strcpy(DomainUser, User); + else { + strcpy(DomainUser, NTDomain); + strcat(DomainUser, "\\"); + strcat(DomainUser, User); + } if (UseAllowedGroup) { if (!Valid_Group(UserName, NTAllowedGroup)) { result = NTV_LOGON_ERROR;