s3: VFS: vfs_streams_depot: Change streams_depot_unlink_internal() to call UNLINKAT().
authorJeremy Allison <jra@samba.org>
Wed, 18 Sep 2019 02:26:13 +0000 (19:26 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:46 +0000 (17:20 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_streams_depot.c

index c51bdac0058aeea23b7cf71e28549ff67c60ec76..10a22f5c22b8ffdf5f5002497fc710ef83f4653e 100644 (file)
@@ -715,7 +715,10 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
                        return -1;
                }
 
-               ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname_stream);
+               ret = SMB_VFS_NEXT_UNLINKAT(handle,
+                               dirfsp,
+                               smb_fname_stream,
+                               0);
 
                TALLOC_FREE(smb_fname_stream);
                return ret;
@@ -774,7 +777,10 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
                TALLOC_FREE(dirname);
        }
 
-       ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
+       ret = SMB_VFS_NEXT_UNLINKAT(handle,
+                               dirfsp,
+                               smb_fname,
+                               flags);
        TALLOC_FREE(smb_fname_base);
        return ret;
 }