Author: weiden
Date: Wed Jul 18 14:50:48 2007
New Revision: 27714
URL:
http://svn.reactos.org/svn/reactos?rev=27714&view=rev
Log:
Implement SetSecurityAccessMask
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.def
trunk/reactos/dll/win32/advapi32/sec/sec.c
trunk/reactos/include/psdk/winbase.h
Modified: trunk/reactos/dll/win32/advapi32/advapi32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.def (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.def Wed Jul 18 14:50:48 2007
@@ -585,6 +585,7 @@
SetNamedSecurityInfoW@28
SetPrivateObjectSecurity@20
;SetPrivateObjectSecurityEx
+SetSecurityAccessMask@8
SetSecurityDescriptorControl@12
SetSecurityDescriptorDacl@16
SetSecurityDescriptorGroup@12
Modified: trunk/reactos/dll/win32/advapi32/sec/sec.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sec…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/sec.c (original)
+++ trunk/reactos/dll/win32/advapi32/sec/sec.c Wed Jul 18 14:50:48 2007
@@ -482,10 +482,30 @@
}
if (SecurityInformation & SACL_SECURITY_INFORMATION)
- {
*DesiredAccess |= ACCESS_SYSTEM_SECURITY;
- }
-}
+}
+
+
+/*
+ * @implemented
+ */
+VOID
+WINAPI
+SetSecurityAccessMask(IN SECURITY_INFORMATION SecurityInformation,
+ OUT LPDWORD DesiredAccess)
+{
+ *DesiredAccess = 0;
+
+ if (SecurityInformation & (OWNER_SECURITY_INFORMATION |
GROUP_SECURITY_INFORMATION))
+ *DesiredAccess |= WRITE_OWNER;
+
+ if (SecurityInformation & DACL_SECURITY_INFORMATION)
+ *DesiredAccess |= WRITE_DAC;
+
+ if (SecurityInformation & SACL_SECURITY_INFORMATION)
+ *DesiredAccess |= ACCESS_SYSTEM_SECURITY;
+}
+
/*
* @unimplemented
Modified: trunk/reactos/include/psdk/winbase.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winbase.h (original)
+++ trunk/reactos/include/psdk/winbase.h Wed Jul 18 14:50:48 2007
@@ -1963,6 +1963,9 @@
BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD);
+#if (_WIN32_WINNT >= 0x0600)
+VOID WINAPI SetSecurityAccessMask(SECURITY_INFORMATION,LPDWORD);
+#endif
BOOL WINAPI
SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);