From: Jeffrey Altman Date: Sat, 15 Dec 2012 17:23:58 +0000 (-0500) Subject: Windows: AFSLocateNameEntry Absolute Symlink Cell resolution X-Git-Tag: upstream/1.8.0_pre1^2~1716 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1dea312bd4974bc3abcdf2aa527ef4c3ca1e283b;p=packages%2Fo%2Fopenafs.git 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 --- 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) {