]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-netidmgr-afs-provider-20070410
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 10 Apr 2007 23:09:18 +0000 (23:09 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 10 Apr 2007 23:09:18 +0000 (23:09 +0000)
when using krb524 with a cross-realm service ticket the resulting krb4
cred will not contain the user's realm as there is only one realm field.

(cherry picked from commit 5bcd5ab54d2e76dc9b253fda6ea6b6bb4dfe87f0)

src/WINNT/netidmgr_plugin/afsfuncs.c
src/libafsrpc/afsrpc.def

index dc314fb787751482fb8583bb9aa54b41263b4590..d185494e437f18d4f9e6143991bbb71640065a55 100644 (file)
@@ -729,6 +729,7 @@ afs_klog(khm_handle identity,
     char       ServiceName[128];
     khm_handle confighandle;
     khm_int32  supports_krb4 = 1;
+    khm_int32   got524cred = 0;
 
     /* signalling */
     BOOL        bGotCreds = FALSE; /* got creds? */
@@ -1017,6 +1018,7 @@ afs_klog(khm_handle identity,
                 goto end_krb5;
             }
             rc = KSUCCESS;
+           got524cred = 1;
             bGotCreds = TRUE;
         }
 
@@ -1146,7 +1148,7 @@ afs_klog(khm_handle identity,
         StringCbCopyA(aclient.instance, sizeof(aclient.instance), "");
 
         StringCchCatA(aclient.name, MAXKTCNAMELEN, "@");
-        StringCchCatA(aclient.name, MAXKTCNAMELEN, creds.realm);
+               StringCchCatA(aclient.name, MAXKTCNAMELEN, got524cred ? realm_of_user : creds.realm);
 
         StringCbCopyA(aclient.cell, sizeof(aclient.cell), CellName);
 
index f60ee2dcd3595988957e10d00090a8e7e46c7c70..a642405b3462c3d773b5bfba0a4bdf9d31b919ed 100644 (file)
@@ -92,7 +92,7 @@ EXPORTS
        multi_Select                            @97
        multi_Init                              @98
        multi_Finalize_Ignore                   @99
-       add_to_error_table                      @100
+       afs_add_to_error_table                  @100
        xdr_afsUUID                             @101
        rx_GetSpecific                          @102
        rx_SetSpecific                          @103