]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: KFW_AFS_get_cred userrealm
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 26 Jul 2011 21:34:52 +0000 (17:34 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 2 Aug 2011 15:02:24 +0000 (08:02 -0700)
The userrealm string in KFW_AFS_get_cred() should not include
the '@' symbol from the user principal.  Including the '@' produces
an invalid realm name.

Reviewed-on: http://gerrit.openafs.org/5110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from 214e9a6052b1dab2a0c4383632640936c3e518c6)

Change-Id: I24007935b35ac2a603486fc40a79f94b9b90fa8e
Reviewed-on: http://gerrit.openafs.org/5138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/afskfw.c

index 67548c747bcea0c99a2c0d805c55e08395a4ac25..7eed20da22b6bc596dcba3839185cb1a0ca0b6d6 100644 (file)
@@ -1398,8 +1398,9 @@ KFW_AFS_get_cred( char * username,
             while ( dot = strchr(pname,'.') ) {
                 *dot = '/';
             }
-            *userrealm++ = '@';
+            *userrealm = '@';
         }
+        userrealm++;
     } else {
         size_t len = strlen(username) + strlen(realm) + 2;
         pname = malloc(len);
@@ -1423,7 +1424,7 @@ KFW_AFS_get_cred( char * username,
         OutputDebugString(realm);
         OutputDebugString("\n");
         OutputDebugString("Realm of User: ");
-        OutputDebugString(userrealm);
+        OutputDebugString(userrealm?userrealm:"<NULL>");
         OutputDebugString("\n");
     }