s3: smbd: rename_internals_fsp() has to reopen the parent directory of the target...
authorJeremy Allison <jra@samba.org>
Tue, 19 Sep 2023 16:49:25 +0000 (09:49 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 19 Sep 2023 18:59:34 +0000 (18:59 +0000)
So it never looks at any passed in dst_dirfsp.

Prove this by passing NULL.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_reply.c
source3/smbd/smb2_trans2.c

index dfcd05d2cae18e7c058566c020410b0b73e61aae..aea5d627addea94ec9e1793d5e03b7ab5dd1a847 100644 (file)
@@ -1938,7 +1938,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
 
        status = rename_internals_fsp(conn,
                                        fsp,
-                                       dst_dirfsp,
+                                       NULL,
                                        smb_fname_dst,
                                        dst_original_lcomp,
                                        attrs,
index 23081a11e43b93443df27841b28ec97ddd1601f1..0f1ef2d43543367bb1259d0b786d2df5122ddb1e 100644 (file)
@@ -4751,7 +4751,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                          smb_fname_str_dbg(smb_fname_dst)));
                status = rename_internals_fsp(conn,
                                        fsp,
-                                       dst_dirfsp,
+                                       NULL,
                                        smb_fname_dst,
                                        dst_original_lcomp,
                                        0,