summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2/sesssetup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-06-06 22:10:30 -0700
committerAndrew Tridgell <tridge@samba.org>2008-06-06 22:10:30 -0700
commite97cf207fac5e4101376d2a10dd95a93a9a1e0fb (patch)
treea779155e15beab87b6d4d023ee5211ffa357b99b /source4/smb_server/smb2/sesssetup.c
parent8e45338c8d5155376d511dcfda2f6d663de19159 (diff)
downloadsamba-e97cf207fac5e4101376d2a10dd95a93a9a1e0fb.tar.gz
samba-e97cf207fac5e4101376d2a10dd95a93a9a1e0fb.tar.bz2
samba-e97cf207fac5e4101376d2a10dd95a93a9a1e0fb.zip
added server side SMB2 signing
(This used to be commit 8e919dcb0826a5b25d037ee6144af5f7cb21f3ae)
Diffstat (limited to 'source4/smb_server/smb2/sesssetup.c')
-rw-r--r--source4/smb_server/smb2/sesssetup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c
index d386bfc72d..482dd181c2 100644
--- a/source4/smb_server/smb2/sesssetup.c
+++ b/source4/smb_server/smb2/sesssetup.c
@@ -177,6 +177,15 @@ static void smb2srv_sesssetup_backend(struct smb2srv_request *req, union smb_ses
gensec_update_send(smb_sess->gensec_ctx, io->smb2.in.secblob,
smb2srv_sesssetup_callback, callback_ctx);
+
+ /* note that we ignore SMB2_NEGOTIATE_SIGNING_ENABLED from the client.
+ This is deliberate as windows does not set it even when it does
+ set SMB2_NEGOTIATE_SIGNING_REQUIRED */
+ if ((io->smb2.in.security_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) ||
+ lp_server_signing(req->smb_conn->lp_ctx) == SMB_SIGNING_REQUIRED) {
+ req->smb_conn->doing_signing = true;
+ }
+
return;
nomem:
status = NT_STATUS_NO_MEMORY;