]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: We expect sane callers of SMB_VFS_RENAMEAT
authorVolker Lendecke <vl@samba.org>
Fri, 17 Jan 2025 12:15:26 +0000 (13:15 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 5 Mar 2025 17:41:34 +0000 (17:41 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_streams_depot.c

index 4da66d6cce49afac9904313e9c7daa7a8d0cd203..4d4b1fe2992069cf063bdd1bc532d10b52a6b93a 100644 (file)
@@ -1060,8 +1060,9 @@ static int streams_depot_renameat(vfs_handle_struct *handle,
 
        src_is_stream = is_ntfs_stream_smb_fname(smb_fname_src);
        dst_is_stream = is_ntfs_stream_smb_fname(smb_fname_dst);
+       SMB_ASSERT(src_is_stream == dst_is_stream);
 
-       if (!src_is_stream && !dst_is_stream) {
+       if (!src_is_stream) {
                return SMB_VFS_NEXT_RENAMEAT(handle,
                                        src_dirfsp,
                                        smb_fname_src,