From: Jeremy Allison Date: Thu, 30 Mar 2023 20:02:01 +0000 (-0700) Subject: s3: smbd: In smb_file_link_information() and smb_file_rename_information() the target... X-Git-Tag: talloc-2.4.1~1196 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=777e324efbbfadf7e1afdabf2c465102f07c9301;p=thirdparty%2Fsamba.git s3: smbd: In smb_file_link_information() and smb_file_rename_information() the target path is never DFS. Ensure we strip from ucs_flags before calling filename_convert_dirfsp(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 2cd882bd889..789b4d5a276 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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,