Author: pschweitzer
Date: Fri Aug 4 19:23:42 2017
New Revision: 75482
URL:
http://svn.reactos.org/svn/reactos?rev=75482&view=rev
Log:
[RDBSS]
Implement RxSetDispositionInfo(): this allows deleting files on a remote NFS share!
CORE-8204
CORE-11327
CORE-13636
Modified:
trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c
Modified: trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/rdbsslib/r…
==============================================================================
--- trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c [iso-8859-1] Fri Aug 4 19:23:42 2017
@@ -8605,12 +8605,47 @@
return Status;
}
+/*
+ * @implemented
+ */
NTSTATUS
RxSetDispositionInfo(
PRX_CONTEXT RxContext)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ NTSTATUS Status;
+
+ PAGED_CODE();
+
+ /* First, make the mini-rdr work! */
+ Status = RxpSetInfoMiniRdr(RxContext, FileDispositionInformation);
+ /* If it succeed, we'll keep track of the change */
+ if (NT_SUCCESS(Status))
+ {
+ PFCB Fcb;
+ PFILE_OBJECT FileObject;
+ PFILE_DISPOSITION_INFORMATION FileDispo;
+
+ Fcb = (PFCB)RxContext->pFcb;
+ FileObject = RxContext->CurrentIrpSp->FileObject;
+ FileDispo = RxContext->CurrentIrp->AssociatedIrp.SystemBuffer;
+ /* Caller asks for deletion: mark as delete on close */
+ if (FileDispo->DeleteFile)
+ {
+ SetFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
+ FileObject->DeletePending = TRUE;
+ }
+ /* Otherwise, clear it */
+ else
+ {
+ ClearFlag(Fcb->FcbState, FCB_STATE_DELETE_ON_CLOSE);
+ FileObject->DeletePending = FALSE;
+ }
+
+ /* Sanitize output */
+ Status = STATUS_SUCCESS;
+ }
+
+ return Status;
}
NTSTATUS