Skip to content

Commit

Permalink
We use SET_ACCESS now, not GRANT_ACCESS.
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Feb 4, 2025
1 parent 7837163 commit 4eb819b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/win/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2299,14 +2299,14 @@ static void build_access_struct(EXPLICIT_ACCESS_W* ea, PSID owner,

if (mode_triplet & 0x1) {
ea->grfAccessPermissions |= STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE;
if (allow_deny == GRANT_ACCESS) {
if (allow_deny == SET_ACCESS) {
ea->grfAccessPermissions |= SYNCHRONIZE | FILE_WRITE_ATTRIBUTES;
}
}

if (mode_triplet & 0x2) {
ea->grfAccessPermissions |= STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_EA | FILE_APPEND_DATA | FILE_ADD_SUBDIRECTORY | FILE_DELETE_CHILD | DELETE;
if (allow_deny == GRANT_ACCESS) {
if (allow_deny == SET_ACCESS) {
ea->grfAccessPermissions |= SYNCHRONIZE | FILE_WRITE_ATTRIBUTES;
}
}
Expand Down

0 comments on commit 4eb819b

Please sign in to comment.