Author: tfaber
Date: Thu Oct 24 19:11:04 2013
New Revision: 60742
URL:
http://svn.reactos.org/svn/reactos?rev=60742&view=rev
Log:
[NPFS]
- Fix IRP_MJ_SET_SECURITY. CID 1102517, 1106330
- Fix variable type in NpCommonQueryVolumeInformation. CID 1102210, 1102211
Modified:
trunk/reactos/drivers/filesystems/npfs/seinfo.c
trunk/reactos/drivers/filesystems/npfs/volinfo.c
Modified: trunk/reactos/drivers/filesystems/npfs/seinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/s…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/seinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/seinfo.c [iso-8859-1] Thu Oct 24 19:11:04 2013
@@ -61,7 +61,9 @@
PNP_FCB Fcb;
PNP_CCB Ccb;
ULONG NamedPipeEnd;
- PVOID CachedSecurityDescriptor, SecurityDescriptor;
+ PSECURITY_DESCRIPTOR OldSecurityDescriptor;
+ PSECURITY_DESCRIPTOR TempSecurityDescriptor;
+ PSECURITY_DESCRIPTOR NewSecurityDescriptor;
PAGED_CODE();
IoStack = IoGetCurrentIrpStackLocation(Irp);
@@ -73,21 +75,22 @@
if (!NodeTypeCode) return STATUS_PIPE_DISCONNECTED;
if (NodeTypeCode != NPFS_NTC_CCB) return STATUS_INVALID_PARAMETER;
+ OldSecurityDescriptor = TempSecurityDescriptor = Fcb->SecurityDescriptor;
Status = SeSetSecurityDescriptorInfo(NULL,
&IoStack->Parameters.SetSecurity.SecurityInformation,
IoStack->Parameters.SetSecurity.SecurityDescriptor,
- &SecurityDescriptor,
+ &TempSecurityDescriptor,
TRUE,
IoGetFileObjectGenericMapping());
if (!NT_SUCCESS(Status)) return Status;
- Status = ObLogSecurityDescriptor(SecurityDescriptor, &CachedSecurityDescriptor,
TRUE);
- ExFreePool(SecurityDescriptor);
+ Status = ObLogSecurityDescriptor(TempSecurityDescriptor, &NewSecurityDescriptor,
TRUE);
+ ExFreePool(TempSecurityDescriptor);
if (!NT_SUCCESS(Status)) return Status;
- Fcb->SecurityDescriptor = CachedSecurityDescriptor;
- ObDereferenceSecurityDescriptor(SecurityDescriptor, 1);
+ Fcb->SecurityDescriptor = NewSecurityDescriptor;
+ ObDereferenceSecurityDescriptor(OldSecurityDescriptor, 1);
return Status;
}
@@ -127,7 +130,7 @@
FsRtlEnterFileSystem();
NpAcquireExclusiveVcb();
- Status = NpCommonQuerySecurityInfo(DeviceObject, Irp);
+ Status = NpCommonSetSecurityInfo(DeviceObject, Irp);
NpReleaseVcb();
FsRtlExitFileSystem();
Modified: trunk/reactos/drivers/filesystems/npfs/volinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/v…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/volinfo.c [iso-8859-1] Thu Oct 24 19:11:04
2013
@@ -140,7 +140,7 @@
IN PIRP Irp)
{
PIO_STACK_LOCATION IoStack;
- FILE_INFORMATION_CLASS InfoClass;
+ FS_INFORMATION_CLASS InfoClass;
ULONG Length;
PVOID Buffer;
NTSTATUS Status;