]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: misplaced brace in KFW_AFS_get_cred
authorJeffrey Altman <jaltman@your-file-system.com>
Thu, 7 Jun 2012 13:23:26 +0000 (09:23 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 3 Jul 2012 15:01:36 +0000 (08:01 -0700)
A misplaced brace in KFW_AFS_get_cred() results in KFW_AFS_klog()
being executed twice in a row if successful.  The second attempt
could fail due to a KRB5KRB_AP_ERR_REPEAT error issued by the KDC.

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

index 1a9371189831c3422c70c0c0cbff3a94072a81f7..ea0596650dc6ab714a2f12deb87198a5bf166c88 100644 (file)
@@ -1210,15 +1210,15 @@ KFW_AFS_get_cred( char * username,
         if ( code ) goto cleanup;
 
         KFW_AFS_update_princ_ccache_data(context, cc, FALSE);
-    }
 
-    code = KFW_AFS_klog(context, cc, "afs", cell, realm, lifetime, smbname);
-    if ( IsDebuggerPresent() ) {
-        char message[256];
-        StringCbPrintf(message, sizeof(message), "KFW_AFS_klog() returns: %d\n", code);
-        OutputDebugString(message);
+        code = KFW_AFS_klog(context, cc, "afs", cell, realm, lifetime, smbname);
+        if ( IsDebuggerPresent() ) {
+            char message[256];
+            StringCbPrintf(message, sizeof(message), "KFW_AFS_klog() returns: %d\n", code);
+            OutputDebugString(message);
+        }
+        if ( code ) goto cleanup;
     }
-    if ( code ) goto cleanup;
 
     KFW_AFS_update_cell_princ_map(context, cell, pname, TRUE);