Skip to content

Commit

Permalink
smbd: Simplify open_file()
Browse files Browse the repository at this point in the history
We have extracted FSP_POSIX_FLAGS_PATHNAMES above.

Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Ralph Boehme <[email protected]>
  • Loading branch information
vlendec authored and slowfranklin committed Oct 5, 2023
1 parent f8645c7 commit 814b37b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source3/smbd/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,8 +1412,7 @@ static NTSTATUS open_file(struct smb_request *req,
} else {
wild = smb_fname->base_name;
}
if ((local_flags & O_CREAT) && !file_existed &&
!(fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES) &&
if ((local_flags & O_CREAT) && !file_existed && !posix_open &&
ms_has_wild(wild)) {
return NT_STATUS_OBJECT_NAME_INVALID;
}
Expand Down

0 comments on commit 814b37b

Please sign in to comment.