]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Inside filename_convert_dirfsp_nosymlink(), don't require UCF_PREP_CREATEFI...
authorJeremy Allison <jra@samba.org>
Mon, 1 Aug 2022 18:40:14 +0000 (11:40 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 2 Aug 2022 19:49:32 +0000 (19:49 +0000)
We don't require it for a new file. Without this change, we have
to add UCF_PREP_CREATEFILE to the destination flags when we are
doing renames to a destination stream name, but not when doing
renames to a destination file name, which makes for inconsistent API use.

filename_convert_dirfsp() is now a drop in replacement
for filename_convert(), even for the ugly SMB1 POSIX
cases.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/filename.c

index 8ccd350410bac284306f340996b36d11aca88600..3e90b8dd71be3c8c42898792e5392731ba4fe758 100644 (file)
@@ -3025,8 +3025,7 @@ static NTSTATUS filename_convert_dirfsp_nosymlink(
                goto done;
        }
 
-       if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND) &&
-           (ucf_flags & UCF_PREP_CREATEFILE)) {
+       if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
                /*
                 * Creating a new stream
                 *