Windows: use hKUserMap to read afslogon username
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 8 Nov 2012 18:26:36 +0000 (13:26 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 9 Nov 2012 04:41:28 +0000 (20:41 -0800)
hkTemp is not the correct registry handle.  Use hkUserMap

Change-Id: I44776b6dd46bb0ecac0c729bf80ed9261ddf7a67
Reviewed-on: http://gerrit.openafs.org/8412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/afslogon.c

index d3e3821..ecee4ab 100644 (file)
@@ -950,7 +950,7 @@ GetDomainLogonOptions( PLUID lpLogonId, BOOLEAN bKerberos,
                 goto doneUserMap;
             dwSize *=2;
             SetLastError(0);
-            rv = RegQueryValueEx(hkTemp, REG_CLIENT_USERNAME_PARM, 0, NULL, (LPBYTE) usermap, &dwSize);
+            rv = RegQueryValueEx(hkUserMap, REG_CLIENT_USERNAME_PARM, 0, NULL, (LPBYTE) usermap, &dwSize);
             if(rv != ERROR_SUCCESS) {/* what the ..? */
                 DebugEvent("Can't look up Username rv [%d] size [%d] gle [%d]", rv, dwSize, GetLastError());
                 goto doneUserMap;