diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-09-29 10:09:41 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-09-29 18:59:54 +0200 |
commit | 24d53ebe441510805ff3e15696fa763c1bb96423 (patch) | |
tree | 9d617d61a02e6716cbb2fbd04df6e546b94dc835 /source4/smb_server/smb2 | |
parent | 08573c2b923d565ed85027376ff88f91a9ee0c77 (diff) | |
download | samba-24d53ebe441510805ff3e15696fa763c1bb96423.tar.gz samba-24d53ebe441510805ff3e15696fa763c1bb96423.tar.bz2 samba-24d53ebe441510805ff3e15696fa763c1bb96423.zip |
s4:smb_server/smb2: make sure we sign the final session setup
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 29 18:59:54 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/sesssetup.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c index 60e5500ee7..243765fb9f 100644 --- a/source4/smb_server/smb2/sesssetup.c +++ b/source4/smb_server/smb2/sesssetup.c @@ -67,6 +67,7 @@ static void smb2srv_sesssetup_callback(struct tevent_req *subreq) union smb_sesssetup *io = ctx->io; struct smbsrv_session *smb_sess = ctx->smb_sess; struct auth_session_info *session_info = NULL; + enum security_user_level user_level; NTSTATUS status; packet_recv_enable(req->smb_conn->packet); @@ -92,10 +93,16 @@ static void smb2srv_sesssetup_callback(struct tevent_req *subreq) } req->session = smb_sess; - if (smb_sess->smb2_signing.required) { - /* activate smb2 signing on the session */ - smb_sess->smb2_signing.active = true; + user_level = security_session_user_level(smb_sess->session_info, NULL); + if (user_level >= SECURITY_USER) { + if (smb_sess->smb2_signing.required) { + /* activate smb2 signing on the session */ + smb_sess->smb2_signing.active = true; + } + /* we need to sign the session setup response */ + req->is_signed = true; } + done: io->smb2.out.uid = smb_sess->vuid; failed: |