s3: VFS: Modify SMB_VFS_GET_NT_ACL to take a const struct smb_filename * instead...
[sfrench/samba-autobuild/.git] / source3 / torture / cmd_vfs.c
index 040759af0c8e86f66b275e141ca79c725a32ba8a..3a8b7f7136ba96cf74d1c129c36b0f9d0c5a3f57 100644 (file)
@@ -1380,13 +1380,23 @@ static NTSTATUS cmd_get_nt_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
 {
        NTSTATUS status;
        struct security_descriptor *sd;
+       struct smb_filename *smb_fname = NULL;
 
        if (argc != 2) {
                printf("Usage: get_nt_acl <path>\n");
                return NT_STATUS_OK;
        }
 
-       status = SMB_VFS_GET_NT_ACL(vfs->conn, argv[1],
+       smb_fname = synthetic_smb_fname(talloc_tos(),
+                                       argv[1],
+                                       NULL,
+                                       NULL);
+
+       if (smb_fname == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
+
+       status = SMB_VFS_GET_NT_ACL(vfs->conn, smb_fname,
                                    SECINFO_OWNER | SECINFO_GROUP | SECINFO_DACL,
                                    talloc_tos(), &sd);
        if (!NT_STATUS_IS_OK(status)) {