summaryrefslogtreecommitdiffstats
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-09-25 01:47:44 +0200
committerMichael Adam <obnox@samba.org>2014-09-30 23:35:08 +0200
commit7ee18fbf1e0fa108c4b3748269035fcee2a57ab5 (patch)
treee311b41fa01bcc4591b2ecade70a7bb81c3b437a /source3/libsmb
parent8c846f78ed38f803bb21d199b52003128b82aa0c (diff)
downloadsamba-7ee18fbf1e0fa108c4b3748269035fcee2a57ab5.tar.gz
samba-7ee18fbf1e0fa108c4b3748269035fcee2a57ab5.tar.xz
samba-7ee18fbf1e0fa108c4b3748269035fcee2a57ab5.zip
s3:smb2cli_tcon: use smb2 signing if possible
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb2cli_tcon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c
index e572c75f0a..d0c294de84 100644
--- a/source3/libsmb/smb2cli_tcon.c
+++ b/source3/libsmb/smb2cli_tcon.c
@@ -44,6 +44,8 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
const char *tcon_share;
uint8_t *dyn;
size_t dyn_len;
+ uint32_t additional_flags = 0;
+ uint32_t clear_flags = 0;
req = tevent_req_create(mem_ctx, &state, struct smb2cli_tcon_state);
if (req == NULL) {
@@ -79,8 +81,12 @@ struct tevent_req *smb2cli_tcon_send(TALLOC_CTX *mem_ctx,
dyn_len = sizeof(state->dyn_pad);
}
+ if (smbXcli_session_is_authenticated(cli->smb2.session)) {
+ additional_flags |= SMB2_HDR_FLAG_SIGNED;
+ }
+
subreq = smb2cli_req_send(state, ev, cli->conn, SMB2_OP_TCON,
- 0, 0, /* flags */
+ additional_flags, clear_flags,
cli->timeout,
NULL, /* tcon */
cli->smb2.session,