smbd: Convert rmdir_internals to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:28:47 +0000 (11:28 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:02 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/close.c

index d41de798782967af10abbca950cb660aa1795e5b..3ad346332e58a92ed225b289c7f49130b3b2d7d8 100644 (file)
@@ -1056,7 +1056,6 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp)
                        struct smb_filename *smb_dname_full = NULL;
                        char *fullname = NULL;
                        bool do_break = true;
-                       NTSTATUS status;
 
                        if (ISDOT(dname) || ISDOTDOT(dname)) {
                                TALLOC_FREE(talloced);
@@ -1078,12 +1077,10 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp)
                                goto err_break;
                        }
 
-                       status = create_synthetic_smb_fname(talloc_tos(),
-                                                           fullname, NULL,
-                                                           NULL,
-                                                           &smb_dname_full);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               errno = map_errno_from_nt_status(status);
+                       smb_dname_full = synthetic_smb_fname(
+                               talloc_tos(), fullname, NULL, NULL);
+                       if (smb_dname_full == NULL) {
+                               errno = ENOMEM;
                                goto err_break;
                        }