mirror of
https://github.com/reactos/reactos.git
synced 2025-07-13 11:44:13 +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:
|
case SE_WINDOW_OBJECT:
|
||||||
if (Write)
|
if (Write)
|
||||||
{
|
{
|
||||||
if (SecurityInfo & (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION))
|
SetSecurityAccessMask(SecurityInfo,
|
||||||
DesiredAccess |= WRITE_OWNER;
|
(PDWORD)&DesiredAccess);
|
||||||
if (SecurityInfo & DACL_SECURITY_INFORMATION)
|
|
||||||
DesiredAccess |= WRITE_DAC;
|
|
||||||
if (SecurityInfo & SACL_SECURITY_INFORMATION)
|
|
||||||
DesiredAccess |= ACCESS_SYSTEM_SECURITY;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (SecurityInfo & (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
QuerySecurityAccessMask(SecurityInfo,
|
||||||
DACL_SECURITY_INFORMATION))
|
(PDWORD)&DesiredAccess);
|
||||||
DesiredAccess |= READ_CONTROL;
|
|
||||||
if (SecurityInfo & SACL_SECURITY_INFORMATION)
|
|
||||||
DesiredAccess |= ACCESS_SYSTEM_SECURITY;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue