summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/fuse/clifuse.c6
-rw-r--r--source3/libsmb/cli_smb2_fnum.c5
-rw-r--r--source3/libsmb/cli_smb2_fnum.h1
-rw-r--r--source3/libsmb/clifile.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/examples/fuse/clifuse.c b/examples/fuse/clifuse.c
index 3c7e4982475..b724e642d4b 100644
--- a/examples/fuse/clifuse.c
+++ b/examples/fuse/clifuse.c
@@ -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) {
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index 35edec88809..aef70f1adc8 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -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);
diff --git a/source3/libsmb/cli_smb2_fnum.h b/source3/libsmb/cli_smb2_fnum.h
index 4fce5fce1c3..2edaae02b1d 100644
--- a/source3/libsmb/cli_smb2_fnum.h
+++ b/source3/libsmb/cli_smb2_fnum.h
@@ -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,
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index b50926307a5..dc3751aa821 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -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 {