symlink: driver uses vnetroot name for reparse path
instead of using the netroot name, use the vnetroot name (which includes \;Y:\) so that reparse requests go to the same vnetroot. was seeing it create new vnetroots otherwise Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
e27299d066
commit
4bc7853cd6
1 changed files with 8 additions and 8 deletions
|
|
@ -2643,17 +2643,17 @@ NTSTATUS nfs41_Create(
|
||||||
* the symlink target's by calling RxPrepareToReparseSymbolicLink()
|
* the symlink target's by calling RxPrepareToReparseSymbolicLink()
|
||||||
* and returning STATUS_REPARSE. the object manager will attempt to
|
* and returning STATUS_REPARSE. the object manager will attempt to
|
||||||
* open the new path, and return its handle for the original open */
|
* open the new path, and return its handle for the original open */
|
||||||
PMRX_NET_ROOT NetRoot = RxContext->pRelevantSrvOpen->pVNetRoot->pNetRoot;
|
PRDBSS_DEVICE_OBJECT DeviceObject = RxContext->RxDeviceObject;
|
||||||
PRDBSS_DEVICE_OBJECT DeviceObject = NetRoot->pSrvCall->RxDeviceObject;
|
PV_NET_ROOT VNetRoot = (PV_NET_ROOT)RxContext->pRelevantSrvOpen->pVNetRoot;
|
||||||
|
PUNICODE_STRING VNetRootPrefix = &VNetRoot->PrefixEntry.Prefix;
|
||||||
UNICODE_STRING AbsPath;
|
UNICODE_STRING AbsPath;
|
||||||
PCHAR buf;
|
PCHAR buf;
|
||||||
BOOLEAN ReparseRequired;
|
BOOLEAN ReparseRequired;
|
||||||
|
|
||||||
/* allocate the string for RxPrepareToReparseSymbolicLink(), and
|
/* allocate the string for RxPrepareToReparseSymbolicLink(), and
|
||||||
* format an absolute path "DeviceName+NetRootName+symlink" */
|
* format an absolute path "DeviceName+VNetRootName+symlink" */
|
||||||
AbsPath.Length = DeviceObject->DeviceName.Length +
|
AbsPath.MaximumLength = AbsPath.Length = DeviceObject->DeviceName.Length +
|
||||||
NetRoot->pNetRootName->Length + entry->u.Open.symlink.Length;
|
VNetRootPrefix->Length + entry->u.Open.symlink.Length;
|
||||||
AbsPath.MaximumLength = AbsPath.Length + sizeof(WCHAR);
|
|
||||||
AbsPath.Buffer = RxAllocatePoolWithTag(NonPagedPool,
|
AbsPath.Buffer = RxAllocatePoolWithTag(NonPagedPool,
|
||||||
AbsPath.MaximumLength, NFS41_MM_POOLTAG);
|
AbsPath.MaximumLength, NFS41_MM_POOLTAG);
|
||||||
if (AbsPath.Buffer == NULL) {
|
if (AbsPath.Buffer == NULL) {
|
||||||
|
|
@ -2664,8 +2664,8 @@ NTSTATUS nfs41_Create(
|
||||||
buf = (PCHAR)AbsPath.Buffer;
|
buf = (PCHAR)AbsPath.Buffer;
|
||||||
RtlCopyMemory(buf, DeviceObject->DeviceName.Buffer, DeviceObject->DeviceName.Length);
|
RtlCopyMemory(buf, DeviceObject->DeviceName.Buffer, DeviceObject->DeviceName.Length);
|
||||||
buf += DeviceObject->DeviceName.Length;
|
buf += DeviceObject->DeviceName.Length;
|
||||||
RtlCopyMemory(buf, NetRoot->pNetRootName->Buffer, NetRoot->pNetRootName->Length);
|
RtlCopyMemory(buf, VNetRootPrefix->Buffer, VNetRootPrefix->Length);
|
||||||
buf += NetRoot->pNetRootName->Length;
|
buf += VNetRootPrefix->Length;
|
||||||
RtlCopyMemory(buf, entry->u.Open.symlink.Buffer, entry->u.Open.symlink.Length);
|
RtlCopyMemory(buf, entry->u.Open.symlink.Buffer, entry->u.Open.symlink.Length);
|
||||||
|
|
||||||
status = RxPrepareToReparseSymbolicLink(RxContext,
|
status = RxPrepareToReparseSymbolicLink(RxContext,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue