diff options
author | Jeremy Allison <jra@samba.org> | 2004-09-17 19:58:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:42 -0500 |
commit | dac628429dd50c6b51327925cd95d6396c5332c8 (patch) | |
tree | 3e00d22e43741867cf25d53caa06d5523ab73eec /source3 | |
parent | fb4c421f1b595535639343fd90bad223457eb6a8 (diff) | |
download | samba-dac628429dd50c6b51327925cd95d6396c5332c8.tar.gz samba-dac628429dd50c6b51327925cd95d6396c5332c8.tar.bz2 samba-dac628429dd50c6b51327925cd95d6396c5332c8.zip |
r2395: Patch from "Stefan (metze) Metzmacher" <metze@samba.org> to fix
opening of quota file.
Jeremy.
(This used to be commit 9a6e331639d7aace294dd663de7d27912fcae146)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/nttrans.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index f717efac63..5e17f76e69 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); + } } /* |