From 1dea312bd4974bc3abcdf2aa527ef4c3ca1e283b Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 15 Dec 2012 12:23:58 -0500 Subject: [PATCH] Windows: AFSLocateNameEntry Absolute Symlink Cell resolution During AFSLocateNameEntry processing of an absolute symlink the component being searched for in the AFSGlobalRoot volume may not be found. In this case, use AFSCheckCell() to query the service to resolve the name. If the AFSGlobalRoot happens to be the Freelance Root Volume then the service can resolve it even though it is not present in the directory listing. Change-Id: Ib6cfce6de5e5e9f619808e6ddbfffac00c596a23 Reviewed-on: http://gerrit.openafs.org/8764 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- .../afsrdr/kernel/lib/AFSNameSupport.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp index dfce8a93b..8e48e09ae 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp @@ -1447,6 +1447,26 @@ AFSLocateNameEntry( IN GUID *AuthGroup, &pDirEntry); } + if ( pDirEntry == NULL && + pParentDirEntry->ObjectInformation->VolumeCB == AFSGlobalRoot) + { + + // + // Check with the service to see if this is a valid cell name + // that can be automatically resolved. Drop the shared TreeLock + // since AFSCheckCellName must acquire it exclusively. + // + + AFSReleaseResource( pParentDirEntry->ObjectInformation->Specific.Directory.DirectoryNodeHdr.TreeLock); + + ntStatus = AFSCheckCellName( AuthGroup, + &uniSearchName, + &pDirEntry); + + AFSAcquireShared( pParentDirEntry->ObjectInformation->Specific.Directory.DirectoryNodeHdr.TreeLock, + TRUE); + } + if( pDirEntry == NULL) { -- 2.39.5