mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3/smbd: move some setup code in smbd_smb2_create_send a few lines up
This is just one of the last steps before splitting out large code parts into _before() and _after() functions. No change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
7c5d996e71
commit
4179a3e67d
@ -476,6 +476,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
struct smb2_create_blob *dh2q = NULL;
|
||||
struct smb2_create_blob *rqls = NULL;
|
||||
bool replay_operation = false;
|
||||
char *fname = NULL;
|
||||
|
||||
if(lp_fake_oplocks(SNUM(smb2req->tcon->compat))) {
|
||||
requested_oplock_level = SMB2_OPLOCK_LEVEL_NONE;
|
||||
@ -518,6 +519,17 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
TALLOC_FREE(smb2req->subreq);
|
||||
smb2req->subreq = req;
|
||||
|
||||
/* these are ignored for SMB2 */
|
||||
in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
|
||||
in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
|
||||
|
||||
in_file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
|
||||
|
||||
fname = talloc_strdup(state, in_name);
|
||||
if (tevent_req_nomem(fname, req)) {
|
||||
return tevent_req_post(req, state->ev);
|
||||
}
|
||||
|
||||
state->out_context_blobs = talloc_zero(state, struct smb2_create_blobs);
|
||||
if (tevent_req_nomem(state->out_context_blobs, req)) {
|
||||
return tevent_req_post(req, state->ev);
|
||||
@ -654,7 +666,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
info = FILE_WAS_CREATED;
|
||||
} else {
|
||||
char *fname;
|
||||
struct smb2_create_blob *exta = NULL;
|
||||
struct ea_list *ea_list = NULL;
|
||||
struct smb2_create_blob *mxac = NULL;
|
||||
@ -703,11 +714,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
#endif
|
||||
|
||||
fname = talloc_strdup(state, in_name);
|
||||
if (tevent_req_nomem(fname, req)) {
|
||||
return tevent_req_post(req, state->ev);
|
||||
}
|
||||
|
||||
if (exta) {
|
||||
if (!lp_ea_support(SNUM(smb2req->tcon->compat))) {
|
||||
tevent_req_nterror(req,
|
||||
@ -999,12 +1005,6 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/* these are ignored for SMB2 */
|
||||
in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
|
||||
in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
|
||||
|
||||
in_file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
|
||||
|
||||
DEBUG(10, ("smbd_smb2_create_send: open execution phase\n"));
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user