mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Call Query/SetSecurityAccessMask to get the mask
svn path=/trunk/; revision=36701
This commit is contained in:
parent
b1c39670f7
commit
c47e063f16
1 changed files with 2 additions and 25 deletions
|
@ -338,16 +338,7 @@ GetFileSecurityW(LPCWSTR lpFileName,
|
|||
|
||||
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 @@ SetFileSecurityW(LPCWSTR lpFileName,
|
|||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue