Skip to content

Commit

Permalink
smbd: Make parent_override_delete a bit more readable
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
vlendec authored and jrasamba committed Aug 6, 2024
1 parent 8353770 commit 95c031b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions source3/smbd/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,12 @@ static bool parent_override_delete(connection_struct *conn,
uint32_t access_mask,
uint32_t rejected_mask)
{
if ((access_mask & DELETE_ACCESS) &&
(rejected_mask & DELETE_ACCESS) &&
can_delete_file_in_directory(conn,
dirfsp,
smb_fname))
{
return true;
if ((access_mask & DELETE_ACCESS) && (rejected_mask & DELETE_ACCESS)) {
bool ok;
ok = can_delete_file_in_directory(conn, dirfsp, smb_fname);
return ok;
}

return false;
}

Expand Down

0 comments on commit 95c031b

Please sign in to comment.