First part of fix for bug #8663 - deleting a symlink fails if the symlink target...
authorJeremy Allison <jra@samba.org>
Thu, 15 Dec 2011 23:50:23 +0000 (15:50 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Mar 2012 19:55:18 +0000 (20:55 +0100)
Remove two unneeded check_name() calls. They have already been done
in order to get here.
(cherry picked from commit 4ceba7f93f530302f3edb23be4e44e3366bcc768)

source3/smbd/open.c

index 70e6b4f56ec50cd5f06d4ccb0c477ed8112dadce..693e488a4bc5435673842a21d72746fcadde087f 100644 (file)
@@ -1431,11 +1431,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                remove_deferred_open_smb_message(req->mid);
        }
 
-       status = check_name(conn, smb_fname->base_name);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
        if (!posix_open) {
                new_dos_attributes &= SAMBA_ATTRIBUTES_MASK;
                if (file_existed) {
@@ -3308,13 +3303,6 @@ NTSTATUS create_file_default(connection_struct *conn,
                }
        }
 
-       /* All file access must go through check_name() */
-
-       status = check_name(conn, smb_fname->base_name);
-       if (!NT_STATUS_IS_OK(status)) {
-               goto fail;
-       }
-
        status = create_file_unixpath(
                conn, req, smb_fname, access_mask, share_access,
                create_disposition, create_options, file_attributes,