diff options
author | Tim Prouty <tprouty@samba.org> | 2008-12-01 12:47:31 -0800 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2008-12-03 17:51:44 -0800 |
commit | 58440122853b65048793efd90ee45916e25c08c1 (patch) | |
tree | b45857ab9f281dde20f34ea046009a9ea0df7ae6 /source3/smbd | |
parent | f79aae70dd10877311243b5b2a55e1f130bd54b6 (diff) | |
download | samba-58440122853b65048793efd90ee45916e25c08c1.tar.gz samba-58440122853b65048793efd90ee45916e25c08c1.tar.bz2 samba-58440122853b65048793efd90ee45916e25c08c1.zip |
s3: Change SMB_VFS_CREATE_FILE to take a create_file_flags argument
This replaces the is_dos_path bool with a more future-proof argument.
The next step is to plumb INTERNAL_OPEN_ONLY through this flag instead
of overridding the oplock_request.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 8 | ||||
-rw-r--r-- | source3/smbd/open.c | 12 | ||||
-rw-r--r-- | source3/smbd/posix_acls.c | 2 | ||||
-rw-r--r-- | source3/smbd/reply.c | 18 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 12 |
5 files changed, 26 insertions, 26 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index a7b2cb6c31..24a14a8c1b 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -479,7 +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 */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_access, /* share_access */ create_disposition, /* create_disposition*/ @@ -951,7 +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 */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_access, /* share_access */ create_disposition, /* create_disposition*/ @@ -1191,7 +1191,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx, req, /* req */ 0, /* root_dir_fid */ oldname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_READ_DATA, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), @@ -1215,7 +1215,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx, req, /* req */ 0, /* root_dir_fid */ newname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_WRITE_DATA, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d2068dde47..55aec16840 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2099,7 +2099,7 @@ NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, NULL, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_WRITE_DATA, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), @@ -2464,7 +2464,7 @@ NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, cons req, /* req */ 0, /* root_dir_fid */ directory, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_READ_ATTRIBUTES, /* access_mask */ FILE_SHARE_NONE, /* share_access */ FILE_CREATE, /* create_disposition*/ @@ -3073,7 +3073,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 create_file_flags, uint32_t access_mask, uint32_t share_access, uint32_t create_disposition, @@ -3099,7 +3099,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, " - "is_dos_path = %s, fname = %s\n", + "create_file_flags = 0x%x, fname = %s\n", (unsigned int)access_mask, (unsigned int)file_attributes, (unsigned int)share_access, @@ -3107,7 +3107,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, is_dos_path ? "true" : "false")); + ea_list, sd, create_file_flags, fname)); /* * Get the file name. @@ -3263,7 +3263,7 @@ NTSTATUS create_file_default(connection_struct *conn, file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS; } - if (is_dos_path) { + if (create_file_flags & CFF_DOS_PATH) { char *converted_fname; SET_STAT_INVALID(sbuf); diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 78a5d548c2..b184279259 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3253,7 +3253,7 @@ NTSTATUS append_parent_acl(files_struct *fsp, NULL, /* req */ 0, /* root_dir_fid */ parent_name, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_READ_ATTRIBUTES, /* access_mask */ FILE_SHARE_NONE, /* share_access */ FILE_OPEN, /* create_disposition*/ diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 728753bc3b..00c744ce1a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1635,7 +1635,7 @@ void reply_open(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - true, /* is_dos_path */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -1781,7 +1781,7 @@ void reply_open_and_X(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - true, /* is_dos_path */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -1981,7 +1981,7 @@ void reply_mknew(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - true, /* is_dos_path */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -2128,7 +2128,7 @@ void reply_ctemp(struct smb_request *req) req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_GENERIC_READ | FILE_GENERIC_WRITE, /* access_mask */ FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */ FILE_OPEN, /* create_disposition*/ @@ -2330,7 +2330,7 @@ static NTSTATUS do_unlink(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ DELETE_ACCESS, /* access_mask */ FILE_SHARE_NONE, /* share_access */ FILE_OPEN, /* create_disposition*/ @@ -5764,7 +5764,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, req, /* req */ 0, /* root_dir_fid */ directory, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ access_mask, /* access_mask */ (FILE_SHARE_READ | /* share_access */ FILE_SHARE_WRITE), @@ -5882,7 +5882,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ access_mask, /* access_mask */ (FILE_SHARE_READ | /* share_access */ FILE_SHARE_WRITE), @@ -6094,7 +6094,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx, NULL, /* req */ 0, /* root_dir_fid */ src, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_GENERIC_READ, /* access_mask */ FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */ FILE_OPEN, /* create_disposition*/ @@ -6123,7 +6123,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx, NULL, /* req */ 0, /* root_dir_fid */ dest, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_GENERIC_WRITE, /* access_mask */ FILE_SHARE_READ | FILE_SHARE_WRITE, /* share_access */ new_create_disposition, /* create_disposition*/ diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index b9a04e9b4f..f41210b2e1 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1011,7 +1011,7 @@ static void call_trans2open(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - true, /* is_dos_path */ + CFF_DOS_PATH, /* create_file_flags */ access_mask, /* access_mask */ share_mode, /* share_access */ create_disposition, /* create_disposition*/ @@ -5064,7 +5064,7 @@ static NTSTATUS smb_set_file_size(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_WRITE_ATTRIBUTES, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), @@ -5844,7 +5844,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_WRITE_DATA, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), @@ -6286,7 +6286,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ FILE_READ_ATTRIBUTES, /* access_mask */ FILE_SHARE_NONE, /* share_access */ FILE_CREATE, /* create_disposition*/ @@ -6460,7 +6460,7 @@ static NTSTATUS smb_posix_open(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ access_mask, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), @@ -6590,7 +6590,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn, req, /* req */ 0, /* root_dir_fid */ fname, /* fname */ - false, /* is_dos_path */ + 0, /* create_file_flags */ DELETE_ACCESS, /* access_mask */ (FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */ FILE_SHARE_DELETE), |