summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/session.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-30 17:26:42 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-30 17:26:42 +1000
commitbe1927cd80838a6807827cef4431c03160d52582 (patch)
tree759fdea9f2c65277f56209494511d24b6f7f1270 /source4/libcli/smb2/session.c
parent9c1519c065a4411b3eb37e8d7738269238950227 (diff)
parentbeaa01e403dda7557a6acdf0181d79d58a33bbbe (diff)
downloadsamba-be1927cd80838a6807827cef4431c03160d52582.tar.gz
samba-be1927cd80838a6807827cef4431c03160d52582.tar.bz2
samba-be1927cd80838a6807827cef4431c03160d52582.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 31308caad0a83a487341307e4e810a69c08ff371)
Diffstat (limited to 'source4/libcli/smb2/session.c')
-rw-r--r--source4/libcli/smb2/session.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source4/libcli/smb2/session.c b/source4/libcli/smb2/session.c
index 29af6652f2..54915d8535 100644
--- a/source4/libcli/smb2/session.c
+++ b/source4/libcli/smb2/session.c
@@ -164,8 +164,8 @@ static void session_request_handler(struct smb2_request *req)
session_key_err = gensec_session_key(session->gensec, &session_key);
if (NT_STATUS_IS_OK(session_key_err)) {
- session->session_key = session_key;
- }
+ session->transport->signing.session_key = session_key;
+ }
}
session->uid = state->io.out.uid;
@@ -187,6 +187,14 @@ static void session_request_handler(struct smb2_request *req)
return;
}
+ if (session->transport->signing.doing_signing) {
+ c->status = smb2_start_signing(session->transport);
+ if (!NT_STATUS_IS_OK(c->status)) {
+ composite_error(c, c->status);
+ return;
+ }
+ }
+
composite_done(c);
}
@@ -208,7 +216,10 @@ struct composite_context *smb2_session_setup_spnego_send(struct smb2_session *se
ZERO_STRUCT(state->io);
state->io.in.vc_number = 0;
- state->io.in.security_mode = 0;
+ if (session->transport->signing.doing_signing) {
+ state->io.in.security_mode =
+ SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED;
+ }
state->io.in.capabilities = 0;
state->io.in.channel = 0;
state->io.in.previous_sessionid = 0;