Author: hbelusca
Date: Thu Jan  7 19:03:35 2016
New Revision: 70530

URL: http://svn.reactos.org/svn/reactos?rev=70530&view=rev
Log:
[SMSS]
- Reenable RTL_QUERY_REGISTRY_DELETE: the "PendingFileRenameOperations(2)" and 
"AllowProtectedRenames" registry values are deleted after being parsed: we 
don't retry at every reboot to remove/rename files that were already 
deleted/renamed.
- Remove superfluous parentheses.
- Warn a FIXME if SFC-protected file renames are allowed and we are processing 
file renames (the "protected file renames" stuff is unimplemented atm.)

Modified:
    trunk/reactos/base/system/smss/sminit.c

Modified: trunk/reactos/base/system/smss/sminit.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/sminit.c?rev=70530&r1=70529&r2=70530&view=diff
==============================================================================
--- trunk/reactos/base/system/smss/sminit.c     [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/sminit.c     [iso-8859-1] Thu Jan  7 
19:03:35 2016
@@ -608,7 +608,7 @@
 
     {
         SmpConfigureAllowProtectedRenames,
-        0, //RTL_QUERY_REGISTRY_DELETE,
+        RTL_QUERY_REGISTRY_DELETE,
         L"AllowProtectedRenames",
         NULL,
         REG_DWORD,
@@ -648,7 +648,7 @@
 
     {
         SmpConfigureFileRenames,
-        0, //RTL_QUERY_REGISTRY_DELETE,
+        RTL_QUERY_REGISTRY_DELETE,
         L"PendingFileRenameOperations",
         &SmpFileRenameList,
         REG_NONE,
@@ -658,7 +658,7 @@
 
     {
         SmpConfigureFileRenames,
-        0, //RTL_QUERY_REGISTRY_DELETE,
+        RTL_QUERY_REGISTRY_DELETE,
         L"PendingFileRenameOperations2",
         &SmpFileRenameList,
         REG_NONE,
@@ -1989,6 +1989,10 @@
     Status = RtlAdjustPrivilege(SE_RESTORE_PRIVILEGE, TRUE, FALSE, &OldState);
     if (NT_SUCCESS(Status)) HavePrivilege = TRUE;
 
+    // FIXME: Handle SFC-protected file renames!
+    if (SmpAllowProtectedRenames)
+        DPRINT1("SMSS: FIXME: Handle SFC-protected file renames!\n");
+
     /* Process pending files to rename */
     Head = &SmpFileRenameList;
     while (!IsListEmpty(Head))
@@ -2073,10 +2077,10 @@
                                           InformationClass);
 
             /* Check if we seem to have failed because the file was readonly */
-            if ((!NT_SUCCESS(Status) &&
+            if (!NT_SUCCESS(Status) &&
                 (InformationClass == FileRenameInformation) &&
                 (Status == STATUS_OBJECT_NAME_COLLISION) &&
-                (Buffer->ReplaceIfExists)))
+                Buffer->ReplaceIfExists)
             {
                 /* Open the file for write attribute access this time... */
                 DPRINT1("\nSMSS: '%wZ' => '%wZ' failed - Status == %x, 
Possible readonly target\n",


Reply via email to