From: Jeremy Allison Date: Fri, 17 Sep 2004 19:58:27 +0000 (+0000) Subject: r2395: Patch from "Stefan (metze) Metzmacher" to fix X-Git-Tag: samba-4.0.0alpha6~801^2~11217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dac628429dd50c6b51327925cd95d6396c5332c8;p=thirdparty%2Fsamba.git r2395: Patch from "Stefan (metze) Metzmacher" to fix opening of quota file. Jeremy. (This used to be commit 9a6e331639d7aace294dd663de7d27912fcae146) --- diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index f717efac63e..5e17f76e697 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -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); + } } /*