mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +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");
|
TRACE("GetFileSecurityW() called\n");
|
||||||
|
|
||||||
if (RequestedInformation &
|
QuerySecurityAccessMask(RequestedInformation, &AccessMask);
|
||||||
(OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION))
|
|
||||||
{
|
|
||||||
AccessMask |= READ_CONTROL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RequestedInformation & SACL_SECURITY_INFORMATION)
|
|
||||||
{
|
|
||||||
AccessMask |= ACCESS_SYSTEM_SECURITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!RtlDosPathNameToNtPathName_U(lpFileName,
|
if (!RtlDosPathNameToNtPathName_U(lpFileName,
|
||||||
&FileName,
|
&FileName,
|
||||||
|
@ -483,21 +474,7 @@ SetFileSecurityW(LPCWSTR lpFileName,
|
||||||
|
|
||||||
TRACE("SetFileSecurityW() called\n");
|
TRACE("SetFileSecurityW() called\n");
|
||||||
|
|
||||||
if (SecurityInformation &
|
SetSecurityAccessMask(SecurityInformation, &AccessMask);
|
||||||
(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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!RtlDosPathNameToNtPathName_U(lpFileName,
|
if (!RtlDosPathNameToNtPathName_U(lpFileName,
|
||||||
&FileName,
|
&FileName,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue