From: Volker Lendecke Date: Fri, 1 Sep 2023 14:33:04 +0000 (+0200) Subject: smbd: Simplify open_file() X-Git-Tag: tevent-0.16.0~226 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=814b37bdcf7eec3c68f1574028dc9c417029e80f;p=thirdparty%2Fsamba.git smbd: Simplify open_file() We have extracted FSP_POSIX_FLAGS_PATHNAMES above. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 90cbf415093..2fbc7db979e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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; }