diff options
author | Tim Prouty <tprouty@samba.org> | 2008-11-19 17:55:28 -0800 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2008-12-03 17:50:37 -0800 |
commit | f995a7af2a06ccff29f23f1b099e0a84bc948f6e (patch) | |
tree | 4d1b1b193f16ea3c6c5567127084cfe9d74be17b /source3/smbd | |
parent | f38d7f20a865b1ff5f7b039dd284d91b2ba7ec26 (diff) | |
download | samba-f995a7af2a06ccff29f23f1b099e0a84bc948f6e.tar.gz samba-f995a7af2a06ccff29f23f1b099e0a84bc948f6e.tar.bz2 samba-f995a7af2a06ccff29f23f1b099e0a84bc948f6e.zip |
s3: Add new "is_dos_path" argument to SMB_VFS_CREATE_FILE
Now unix paths can be differentiated from windows paths so the
underlying create_file implementations can convert paths correctly.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 2 | ||||
-rw-r--r-- | source3/smbd/open.c | 7 | ||||
-rw-r--r-- | source3/smbd/reply.c | 3 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 1 |
4 files changed, 10 insertions, 3 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index f2c6eaccca..b66aba5aac 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -479,6 +479,7 @@ void reply_ntcreate_and_X(struct smb_request *req) req, /* req */ root_dir_fid, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_access, /* share_access */ create_disposition, /* create_disposition*/ @@ -950,6 +951,7 @@ static void call_nt_transact_create(connection_struct *conn, req, /* req */ root_dir_fid, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_access, /* share_access */ create_disposition, /* create_disposition*/ diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 924b6c5905..d8f5548883 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3086,6 +3086,7 @@ NTSTATUS create_file_default(connection_struct *conn, struct smb_request *req, uint16_t root_dir_fid, const char *fname, + bool is_dos_path, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, @@ -3111,7 +3112,7 @@ NTSTATUS create_file_default(connection_struct *conn, "create_disposition = 0x%x create_options = 0x%x " "oplock_request = 0x%x " "root_dir_fid = 0x%x, ea_list = 0x%p, sd = 0x%p, " - "fname = %s\n", + "is_dos_path = %s, fname = %s\n", (unsigned int)access_mask, (unsigned int)file_attributes, (unsigned int)share_access, @@ -3119,7 +3120,7 @@ NTSTATUS create_file_default(connection_struct *conn, (unsigned int)create_options, (unsigned int)oplock_request, (unsigned int)root_dir_fid, - ea_list, sd, fname)); + ea_list, sd, fname, is_dos_path ? "true" : "false")); /* * Get the file name. @@ -3275,7 +3276,7 @@ NTSTATUS create_file_default(connection_struct *conn, file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS; } - { + if (is_dos_path) { char *converted_fname; SET_STAT_INVALID(sbuf); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index dfd4b47608..80292636a6 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1635,6 +1635,7 @@ void reply_open(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -1780,6 +1781,7 @@ void reply_open_and_X(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -1979,6 +1981,7 @@ void reply_mknew(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 4669e883fd..9ba6d198c4 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1011,6 +1011,7 @@ static void call_trans2open(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ + true, /* is_dos_path */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ |