1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s3:libsmb: pass impersonation_level to cli_smb2_create_fnum_send()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Tim Beale <timbeale@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-12-07 16:32:05 +01:00
parent 64e68abdc9
commit be464c1dc8
4 changed files with 12 additions and 4 deletions

View File

@ -151,7 +151,8 @@ static void cli_ll_create(fuse_req_t freq, fuse_ino_t parent, const char *name,
req = cli_smb2_create_fnum_send(
state, mstate->ev, mstate->cli, state->path,
0, FILE_GENERIC_READ|FILE_GENERIC_WRITE, FILE_ATTRIBUTE_NORMAL,
0, SMB2_IMPERSONATION_IMPERSONATION,
FILE_GENERIC_READ|FILE_GENERIC_WRITE, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_CREATE, FILE_NON_DIRECTORY_FILE);
if (req == NULL) {
@ -836,7 +837,8 @@ static void cli_ll_open(fuse_req_t freq, fuse_ino_t ino,
req = cli_smb2_create_fnum_send(
state, mstate->ev, mstate->cli, istate->path,
0, acc, FILE_ATTRIBUTE_NORMAL,
0, SMB2_IMPERSONATION_IMPERSONATION,
acc, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN, FILE_NON_DIRECTORY_FILE);
if (req == NULL) {

View File

@ -171,6 +171,7 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx,
struct cli_state *cli,
const char *fname,
uint32_t create_flags,
uint32_t impersonation_level,
uint32_t desired_access,
uint32_t file_attributes,
uint32_t share_access,
@ -262,7 +263,7 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx,
cli->smb2.tcon,
fname,
flags_to_smb2_oplock(create_flags),
SMB2_IMPERSONATION_IMPERSONATION,
impersonation_level,
desired_access,
file_attributes,
share_access,
@ -345,6 +346,7 @@ NTSTATUS cli_smb2_create_fnum(struct cli_state *cli,
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *req;
uint32_t impersonation_level = SMB2_IMPERSONATION_IMPERSONATION;
NTSTATUS status = NT_STATUS_NO_MEMORY;
if (smbXcli_conn_has_async_calls(cli->conn)) {
@ -359,6 +361,7 @@ NTSTATUS cli_smb2_create_fnum(struct cli_state *cli,
goto fail;
}
req = cli_smb2_create_fnum_send(frame, ev, cli, fname, create_flags,
impersonation_level,
desired_access, file_attributes,
share_access, create_disposition,
create_options);

View File

@ -30,6 +30,7 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx,
struct cli_state *cli,
const char *fname,
uint32_t create_flags,
uint32_t impersonation_level,
uint32_t desired_access,
uint32_t file_attributes,
uint32_t share_access,

View File

@ -2102,6 +2102,7 @@ struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx,
{
struct tevent_req *req, *subreq;
struct cli_ntcreate_state *state;
uint32_t impersonation_level = SMB2_IMPERSONATION_IMPERSONATION;
req = tevent_req_create(mem_ctx, &state, struct cli_ntcreate_state);
if (req == NULL) {
@ -2116,7 +2117,8 @@ struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_smb2_create_fnum_send(
state, ev, cli, fname, create_flags, desired_access,
state, ev, cli, fname, create_flags,
impersonation_level, desired_access,
file_attributes, share_access, create_disposition,
create_options);
} else {