]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT() in rmdir case.
authorJeremy Allison <jra@samba.org>
Fri, 4 Oct 2019 19:51:06 +0000 (12:51 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 10 Oct 2019 06:09:40 +0000 (06:09 +0000)
Use conn->cwd_fsp as current fsp.

No logic change for now.

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

index 9024f16d96d636bf0c5429ed7304c2d7814eecb8..2408db1268c6ffca27d88a0cf4db266bf95a185a 100644 (file)
@@ -454,7 +454,10 @@ static NTSTATUS cmd_pathfunc(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int arg
        }
 
        if (strcmp("rmdir", argv[0]) == 0 ) {
-               ret = SMB_VFS_RMDIR(vfs->conn, smb_fname);
+               ret = SMB_VFS_UNLINKAT(vfs->conn,
+                               vfs->conn->cwd_fsp,
+                               smb_fname,
+                               AT_REMOVEDIR);
                TALLOC_FREE(smb_fname);
        } else if (strcmp("unlink", argv[0]) == 0 ) {
                TALLOC_FREE(smb_fname);