summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-07 14:23:10 +0100
committerVolker Lendecke <vl@samba.org>2008-01-02 13:32:12 +0100
commitcc322c708c3ba3e73b9788ca27a233873effb88b (patch)
tree116207f801b76abb793a502e1f791054c33dc9ca /source3/smbd
parentc1328242652e4d61348cf00ba66e52485f4bbcaf (diff)
downloadsamba-cc322c708c3ba3e73b9788ca27a233873effb88b.tar.gz
samba-cc322c708c3ba3e73b9788ca27a233873effb88b.tar.bz2
samba-cc322c708c3ba3e73b9788ca27a233873effb88b.zip
Convert reply_open_and_X to create_file
(This used to be commit fa09b9ab26657af9bd6dcf3fcc7311d5983a591d)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c61
1 files changed, 19 insertions, 42 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 452b803f9c..4b873037b5 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1741,53 +1741,30 @@ void reply_open_and_X(connection_struct *conn, struct smb_request *req)
return;
}
- status = resolve_dfspath(ctx, conn,
- req->flags2 & FLAGS2_DFS_PATHNAMES,
- fname,
- &fname);
- if (!NT_STATUS_IS_OK(status)) {
- END_PROFILE(SMBopenX);
- if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
- reply_botherror(req, NT_STATUS_PATH_NOT_COVERED,
- ERRSRV, ERRbadpath);
- return;
- }
- reply_nterror(req, status);
- return;
- }
-
- status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- END_PROFILE(SMBopenX);
- return;
- }
-
- status = check_name(conn, fname);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- END_PROFILE(SMBopenX);
- return;
- }
-
- if (!map_open_params_to_ntcreate(fname, deny_mode, smb_ofun,
- &access_mask,
- &share_mode,
- &create_disposition,
- &create_options)) {
+ if (!map_open_params_to_ntcreate(
+ fname, deny_mode, smb_ofun, &access_mask,
+ &share_mode, &create_disposition, &create_options)) {
reply_nterror(req, NT_STATUS_DOS(ERRDOS, ERRbadaccess));
END_PROFILE(SMBopenX);
return;
}
- status = open_file_ntcreate(conn, req, fname, &sbuf,
- access_mask,
- share_mode,
- create_disposition,
- create_options,
- smb_attr,
- oplock_request,
- &smb_action, &fsp);
+ status = create_file(conn, /* conn */
+ req, /* req */
+ 0, /* root_dir_fid */
+ fname, /* fname */
+ access_mask, /* access_mask */
+ share_mode, /* share_access */
+ create_disposition, /* create_disposition*/
+ create_options, /* create_options */
+ smb_attr, /* file_attributes */
+ oplock_request, /* oplock_request */
+ 0, /* allocation_size */
+ NULL, /* sd */
+ NULL, /* ea_list */
+ &fsp, /* result */
+ &smb_action, /* pinfo */
+ &sbuf); /* psbuf */
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBopenX);