smbd: Convert change_dir_owner_to_parent to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:12:40 +0000 (11:12 +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/open.c

index 78b824541ae427f6b2f3158ad6963795cea029a8..cbbd4e3d2fd69c203a204f68d6d2b5292e661028 100644 (file)
@@ -441,17 +441,17 @@ NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
                                       const char *fname,
                                       SMB_STRUCT_STAT *psbuf)
 {
-       struct smb_filename *smb_fname_parent = NULL;
+       struct smb_filename *smb_fname_parent;
        struct smb_filename *smb_fname_cwd = NULL;
        char *saved_dir = NULL;
        TALLOC_CTX *ctx = talloc_tos();
        NTSTATUS status = NT_STATUS_OK;
        int ret;
 
-       status = create_synthetic_smb_fname(ctx, inherit_from_dir, NULL, NULL,
-                                           &smb_fname_parent);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
+       smb_fname_parent = synthetic_smb_fname(ctx, inherit_from_dir,
+                                              NULL, NULL);
+       if (smb_fname_parent == NULL) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        ret = SMB_VFS_STAT(conn, smb_fname_parent);