Windows: Create Symlinks in Volume Roots
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 23 Mar 2013 01:14:48 +0000 (21:14 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 23 Mar 2013 04:39:20 +0000 (21:39 -0700)
Permit the CreateSymbolicLink API to create symlinks in volume
root directories.

Change-Id: I779f127f9a7e4ddfee41fe7a9398f20175843be0
Reviewed-on: http://gerrit.openafs.org/9656
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/AFSFSControl.cpp

index 322b94b..92e8b3a 100644 (file)
@@ -998,11 +998,19 @@ AFSProcessUserFsRequest( IN PIRP Irp)
                 AFSAcquireExcl( pCcb->DirectoryCB->ObjectInformation->VolumeCB->ObjectInfoTree.TreeLock,
                                 TRUE);
 
-                ullIndex = AFSCreateLowIndex( &pCcb->DirectoryCB->ObjectInformation->ParentFileId);
+                if ( AFSIsVolumeFID( &pCcb->DirectoryCB->ObjectInformation->ParentFileId))
+                {
+
+                    pParentObjectInfo = &pCcb->DirectoryCB->ObjectInformation->VolumeCB->ObjectInformation;
+                }
+                else
+                {
+                    ullIndex = AFSCreateLowIndex( &pCcb->DirectoryCB->ObjectInformation->ParentFileId);
 
-                ntStatus = AFSLocateHashEntry( pCcb->DirectoryCB->ObjectInformation->VolumeCB->ObjectInfoTree.TreeHead,
-                                               ullIndex,
-                                               (AFSBTreeEntry **)&pParentObjectInfo);
+                    ntStatus = AFSLocateHashEntry( pCcb->DirectoryCB->ObjectInformation->VolumeCB->ObjectInfoTree.TreeHead,
+                                                   ullIndex,
+                                                   (AFSBTreeEntry **)&pParentObjectInfo);
+                }
 
                 if ( NT_SUCCESS( ntStatus))
                 {