mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
Make use of Set/QuerySecurityAccessMask
svn path=/trunk/; revision=27715
This commit is contained in:
parent
974c3eaf16
commit
aaad49980c
1 changed files with 4 additions and 11 deletions
|
@ -581,20 +581,13 @@ AccpOpenNamedObject(LPWSTR pObjectName,
|
|||
case SE_WINDOW_OBJECT:
|
||||
if (Write)
|
||||
{
|
||||
if (SecurityInfo & (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION))
|
||||
DesiredAccess |= WRITE_OWNER;
|
||||
if (SecurityInfo & DACL_SECURITY_INFORMATION)
|
||||
DesiredAccess |= WRITE_DAC;
|
||||
if (SecurityInfo & SACL_SECURITY_INFORMATION)
|
||||
DesiredAccess |= ACCESS_SYSTEM_SECURITY;
|
||||
SetSecurityAccessMask(SecurityInfo,
|
||||
(PDWORD)&DesiredAccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SecurityInfo & (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
||||
DACL_SECURITY_INFORMATION))
|
||||
DesiredAccess |= READ_CONTROL;
|
||||
if (SecurityInfo & SACL_SECURITY_INFORMATION)
|
||||
DesiredAccess |= ACCESS_SYSTEM_SECURITY;
|
||||
QuerySecurityAccessMask(SecurityInfo,
|
||||
(PDWORD)&DesiredAccess);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue