Skip to content

Commit

Permalink
win,fs: We use SET_ACCESS now, not GRANT_ACCESS
Browse files Browse the repository at this point in the history
So we must handle that appropriately in this helper function
  • Loading branch information
staticfloat committed Feb 6, 2025
1 parent 20d55c5 commit c1e06dd
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 @@ -2282,14 +2282,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 c1e06dd

Please sign in to comment.