]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In smb_file_link_information() and smb_file_rename_information() the target...
authorJeremy Allison <jra@samba.org>
Thu, 30 Mar 2023 20:02:01 +0000 (13:02 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 31 Mar 2023 05:12:32 +0000 (05:12 +0000)
Ensure we strip from ucs_flags before calling filename_convert_dirfsp().

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

index 2cd882bd88979e6f96b4405d8d29fe7191d6aa4b..789b4d5a276f30e9ce0789d28ec8900f8fd73539 100644 (file)
@@ -4657,6 +4657,9 @@ static NTSTATUS smb_file_link_information(connection_struct *conn,
        if (ucf_flags & UCF_GMT_PATHNAME) {
                extract_snapshot_token(newname, &dst_twrp);
        }
+       /* hardlink paths are never DFS. */
+       ucf_flags &= ~UCF_DFS_PATHNAME;
+
        status = filename_convert_dirfsp(ctx,
                                         conn,
                                         newname,
@@ -4830,6 +4833,10 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                if (ucf_flags & UCF_GMT_PATHNAME) {
                        extract_snapshot_token(base_name, &dst_twrp);
                }
+
+               /* The newname is *not* a DFS path. */
+               ucf_flags &= ~UCF_DFS_PATHNAME;
+
                status = filename_convert_dirfsp(ctx,
                                         conn,
                                         base_name,