From bab05cedab39c4d71366d44361fc2ab7b1785245 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 10 Apr 2007 23:09:18 +0000 Subject: [PATCH] DEVEL15-windows-netidmgr-afs-provider-20070410 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 | 4 +++- src/libafsrpc/afsrpc.def | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/WINNT/netidmgr_plugin/afsfuncs.c b/src/WINNT/netidmgr_plugin/afsfuncs.c index dc314fb787..d185494e43 100644 --- a/src/WINNT/netidmgr_plugin/afsfuncs.c +++ b/src/WINNT/netidmgr_plugin/afsfuncs.c @@ -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); diff --git a/src/libafsrpc/afsrpc.def b/src/libafsrpc/afsrpc.def index f60ee2dcd3..a642405b34 100644 --- a/src/libafsrpc/afsrpc.def +++ b/src/libafsrpc/afsrpc.def @@ -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