[ros-diffs] [gedmurphy] 36701: Call Query/SetSecurityAccessMask to get the mask

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Thu Oct 9 17:06:58 CEST 2008


Author: gedmurphy
Date: Thu Oct  9 10:06:57 2008
New Revision: 36701

URL: http://svn.reactos.org/svn/reactos?rev=36701&view=rev
Log:
Call Query/SetSecurityAccessMask to get the mask

Modified:
    trunk/reactos/dll/win32/advapi32/sec/misc.c

Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/misc.c?rev=36701&r1=36700&r2=36701&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] Thu Oct  9 10:06:57 2008
@@ -338,16 +338,7 @@
 
     TRACE("GetFileSecurityW() called\n");
 
-    if (RequestedInformation &
-        (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION))
-    {
-        AccessMask |= READ_CONTROL;
-    }
-
-    if (RequestedInformation & SACL_SECURITY_INFORMATION)
-    {
-        AccessMask |= ACCESS_SYSTEM_SECURITY;
-    }
+    QuerySecurityAccessMask(RequestedInformation, &AccessMask);
 
     if (!RtlDosPathNameToNtPathName_U(lpFileName,
                                       &FileName,
@@ -483,21 +474,7 @@
 
     TRACE("SetFileSecurityW() called\n");
 
-    if (SecurityInformation &
-        (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION))
-    {
-        AccessMask |= WRITE_OWNER;
-    }
-
-    if (SecurityInformation & DACL_SECURITY_INFORMATION)
-    {
-        AccessMask |= WRITE_DAC;
-    }
-
-    if (SecurityInformation & SACL_SECURITY_INFORMATION)
-    {
-        AccessMask |= ACCESS_SYSTEM_SECURITY;
-    }
+    SetSecurityAccessMask(SecurityInformation, &AccessMask);
 
     if (!RtlDosPathNameToNtPathName_U(lpFileName,
                                       &FileName,



More information about the Ros-diffs mailing list