]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify open_file()
authorVolker Lendecke <vl@samba.org>
Fri, 1 Sep 2023 14:33:04 +0000 (16:33 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 5 Oct 2023 12:58:33 +0000 (12:58 +0000)
We have extracted FSP_POSIX_FLAGS_PATHNAMES above.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c

index 90cbf4150932754ea0b94502761f50a4e089ac2a..2fbc7db979eeb417870a2bea1b5b29ef8868f172 100644 (file)
@@ -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;
                }