]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2395: Patch from "Stefan (metze) Metzmacher" <metze@samba.org> to fix
authorJeremy Allison <jra@samba.org>
Fri, 17 Sep 2004 19:58:27 +0000 (19:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:42 +0000 (10:52 -0500)
opening of quota file.
Jeremy.
(This used to be commit 9a6e331639d7aace294dd663de7d27912fcae146)

source3/smbd/nttrans.c

index f717efac63eb9f88b1096621afc0411c57e0ff61..5e17f76e697c0a4805d83c45b8592fb4ec17c855 100644 (file)
@@ -762,16 +762,21 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
        set_posix_case_semantics(conn, file_attributes);
                
        unix_convert(fname,conn,0,&bad_path,&sbuf);
-       if (bad_path) {
-               restore_case_semantics(conn, file_attributes);
-               END_PROFILE(SMBntcreateX);
-               return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
-       }
-       /* All file access must go through check_name() */
-       if (!check_name(fname,conn)) {
-               restore_case_semantics(conn, file_attributes);
-               END_PROFILE(SMBntcreateX);
-               return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
+
+       /* FAKE_FILE is a special case */
+       if (fake_file_type == FAKE_FILE_TYPE_NONE) {
+               /* Normal file. */
+               if (bad_path) {
+                       restore_case_semantics(conn, file_attributes);
+                       END_PROFILE(SMBntcreateX);
+                       return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
+               }
+               /* All file access must go through check_name() */
+               if (!check_name(fname,conn)) {
+                       restore_case_semantics(conn, file_attributes);
+                       END_PROFILE(SMBntcreateX);
+                       return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
+               }
        }
 
        /*