FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN, /* CreateDisposition */
0, /* CreateOptions */
+ SMB2_IMPERSONATION_IMPERSONATION,
0); /* SecurityFlags */
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN, /* CreateDisposition */
0, /* CreateOptions */
+ SMB2_IMPERSONATION_IMPERSONATION,
0); /* SecurityFlags */
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_OPEN, /* CreateDisposition */
0, /* CreateOptions */
+ SMB2_IMPERSONATION_IMPERSONATION,
0); /* SecurityFlags */
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
uint32_t share_access,
uint32_t create_disposition,
uint32_t create_options,
+ uint32_t impersonation_level,
uint8_t security_flags)
{
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) {
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *req;
+ uint32_t ImpersonationLevel = SMB2_IMPERSONATION_IMPERSONATION;
NTSTATUS status = NT_STATUS_NO_MEMORY;
if (smbXcli_conn_has_async_calls(cli->conn)) {
req = cli_ntcreate_send(frame, ev, cli, fname, CreatFlags,
DesiredAccess, FileAttributes, ShareAccess,
CreateDisposition, CreateOptions,
- SecurityFlags);
+ ImpersonationLevel, SecurityFlags);
if (req == NULL) {
goto fail;
}
FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, FILE_CREATE,
FILE_OPEN_REPARSE_POINT|FILE_SYNCHRONOUS_IO_NONALERT|
- FILE_NON_DIRECTORY_FILE, 0);
+ FILE_NON_DIRECTORY_FILE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
subreq = cli_ntcreate_send(
state, ev, cli, fname, 0, FILE_READ_ATTRIBUTES | FILE_READ_EA,
0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- FILE_OPEN, FILE_OPEN_REPARSE_POINT, 0);
+ FILE_OPEN, FILE_OPEN_REPARSE_POINT,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
uint32_t ShareAccess,
uint32_t CreateDisposition,
uint32_t CreateOptions,
+ uint32_t ImpersonationLevel,
uint8_t SecurityFlags);
NTSTATUS cli_ntcreate_recv(struct tevent_req *req,
uint16_t *pfnum,
unsigned ShareAccess = 0;
unsigned CreateDisposition = FILE_OPEN;
unsigned CreateOptions = 0;
+ unsigned ImpersonationLevel = SMB2_IMPERSONATION_IMPERSONATION;
unsigned SecurityFlags = 0;
uint16_t fnum;
struct tevent_req *req;
req = cli_ntcreate_send(NULL, self->ev, self->cli, fname, CreateFlags,
DesiredAccess, FileAttributes, ShareAccess,
CreateDisposition, CreateOptions,
- SecurityFlags);
+ ImpersonationLevel, SecurityFlags);
if (!py_tevent_req_wait_exc(self, req)) {
return NULL;
}
state, ev, nb_state->cli, state->ft->cp.fname, flags,
desired_access, 0, share_mode,
state->ft->cp.cr_disposition,
- state->ft->cp.cr_options, 0);
+ state->ft->cp.cr_options,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
break;
}
case NBENCH_CMD_CLOSE: {
GENERIC_READ_ACCESS|GENERIC_WRITE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0);
+ FILE_OVERWRITE_IF, 0,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
state, state->ev, state->cli, path, 0,
MAXIMUM_ALLOWED_ACCESS,
0, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, FILE_DIRECTORY_FILE, 0);
+ FILE_OPEN, FILE_DIRECTORY_FILE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
state, state->ev, state->cli, state->dir, 0,
MAXIMUM_ALLOWED_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN_IF, FILE_DIRECTORY_FILE, 0);
+ FILE_OPEN_IF, FILE_DIRECTORY_FILE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
MAXIMUM_ALLOWED_ACCESS, 0,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
FILE_CREATE,
- FILE_DIRECTORY_FILE, 0);
+ FILE_DIRECTORY_FILE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return;
}
state, ev, cli, dname, EXTENDED_RESPONSE_REQUIRED,
SEC_FILE_READ_DATA, 0,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- FILE_OPEN, 0, 0);
+ FILE_OPEN, 0, SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
state, state->ev, state->cli, state->fname, 0,
GENERIC_READ_ACCESS, FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN, FILE_NON_DIRECTORY_FILE, 0);
+ FILE_OPEN, FILE_NON_DIRECTORY_FILE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return;
}
subreq = cli_ntcreate_send(
mem_ctx, ev, cli, fname, 0, FILE_GENERIC_READ,
FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN_IF, 0, 0);
+ FILE_OPEN_IF, 0, SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
FILE_READ_DATA|FILE_WRITE_DATA|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OPEN_IF, FILE_DELETE_ON_CLOSE, 0);
+ FILE_OPEN_IF, FILE_DELETE_ON_CLOSE,
+ SMB2_IMPERSONATION_IMPERSONATION, 0);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);