First part of fix for bug #8663 - deleting a symlink fails if the symlink target...
authorJeremy Allison <jra@samba.org>
Fri, 16 Dec 2011 23:35:55 +0000 (15:35 -0800)
committerKarolin Seeger <kseeger@samba.org>
Sat, 21 Jan 2012 20:06:42 +0000 (21:06 +0100)
Remove two unneeded check_name() calls. They have already been done
in order to get here.

source3/smbd/open.c

index 09716d906be37bbb345f0567d36b85c107aad872..ab54f28c352f174b2a673bc4fe37b64c9e740c31 100644 (file)
@@ -1624,11 +1624,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                }
        }
 
-       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) {
@@ -3649,13 +3644,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;
-       }
-
        if (stream_name && is_ntfs_default_stream_smb_fname(smb_fname)) {
                int ret;
                smb_fname->stream_name = NULL;