]> git.samba.org - obnox/samba/samba-obnox.git/commitdiff
smbd: Convert can_delete_file_in_directory to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:05:20 +0000 (11:05 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:01 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/file_access.c

index f4a7bb3d45ae3b236224017ba8126754bcc20069..cead1e43015ae2a3e138f2541ed9e178a9c5da01 100644 (file)
@@ -37,8 +37,7 @@ bool can_delete_file_in_directory(connection_struct *conn,
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *dname = NULL;
-       struct smb_filename *smb_fname_parent = NULL;
-       NTSTATUS status;
+       struct smb_filename *smb_fname_parent;
        bool ret;
 
        if (!CAN_WRITE(conn)) {
@@ -55,9 +54,8 @@ bool can_delete_file_in_directory(connection_struct *conn,
                return False;
        }
 
-       status = create_synthetic_smb_fname(ctx, dname, NULL, NULL,
-                                           &smb_fname_parent);
-       if (!NT_STATUS_IS_OK(status)) {
+       smb_fname_parent = synthetic_smb_fname(ctx, dname, NULL, NULL);
+       if (smb_fname_parent == NULL) {
                ret = false;
                goto out;
        }