diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-06-06 22:10:30 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-06-06 22:10:30 -0700 |
commit | e97cf207fac5e4101376d2a10dd95a93a9a1e0fb (patch) | |
tree | a779155e15beab87b6d4d023ee5211ffa357b99b /source4/smb_server/smb2/negprot.c | |
parent | 8e45338c8d5155376d511dcfda2f6d663de19159 (diff) | |
download | samba-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/negprot.c')
-rw-r--r-- | source4/smb_server/smb2/negprot.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c index 4479ae2da1..2da39001ab 100644 --- a/source4/smb_server/smb2/negprot.c +++ b/source4/smb_server/smb2/negprot.c @@ -111,7 +111,18 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2 boot_time = timeval_current(); /* TODO: fix me */ ZERO_STRUCT(io->out); - io->out.security_mode = 0; /* no signing yet */ + switch (lp_server_signing(req->smb_conn->lp_ctx)) { + case SMB_SIGNING_OFF: + io->out.security_mode = 0; + break; + case SMB_SIGNING_SUPPORTED: + case SMB_SIGNING_AUTO: + io->out.security_mode = SMB2_NEGOTIATE_SIGNING_ENABLED; + break; + case SMB_SIGNING_REQUIRED: + io->out.security_mode = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED; + break; + } io->out.dialect_revision = SMB2_DIALECT_REVISION; io->out.capabilities = 0; io->out.max_transact_size = lp_parm_ulong(req->smb_conn->lp_ctx, NULL, |