]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: AFSLocateNameEntry Absolute Symlink Cell resolution
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 15 Dec 2012 17:23:58 +0000 (12:23 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Tue, 18 Dec 2012 06:28:32 +0000 (22:28 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp

index dfce8a93b46341aa5d1045462b4c66fd22910349..8e48e09ae94fe34d3e3e1dc603d782ca92e19a86 100644 (file)
@@ -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)
                         {