]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_streams_depot: Use NEXT_UNLINKAT when deleting a stream
authorVolker Lendecke <vl@samba.org>
Thu, 2 Oct 2025 12:09:50 +0000 (14:09 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 10 Oct 2025 08:23:37 +0000 (08:23 +0000)
With other modules in the chain funny things can happen

I don't have a concrete bug that I could write a test for, but with
the upcoming patches this becomes necessary.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_streams_depot.c

index 19b9356fd577a9f9ed2c5d020b0720336fbbc3ae..81a11668864e54669af6c42ecc51a81b3f279bcb 100644 (file)
@@ -809,7 +809,6 @@ static int streams_depot_unlinkat_stream(vfs_handle_struct *handle,
                                         struct files_struct *dirfsp,
                                         const struct smb_filename *smb_fname)
 {
-       struct connection_struct *conn = handle->conn;
        struct smb_filename sname = {};
        struct smb_filename *base_name = NULL;
        struct smb_filename *stream_dir = NULL;
@@ -858,7 +857,7 @@ static int streams_depot_unlinkat_stream(vfs_handle_struct *handle,
                goto done;
        }
 
-       ret = SMB_VFS_UNLINKAT(conn, stream_dir->fsp, &sname, 0);
+       ret = SMB_VFS_NEXT_UNLINKAT(handle, stream_dir->fsp, &sname, 0);
 done:
        {
                int err = errno;