mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3: smbd: signing. Ensure we respond correctly to an SMB2 negprot with SMB2_NEGOTIATE_SIGNING_REQUIRED.
Bug 11103: - Samba does not set the required flags in the SMB2/SMB3 Negotiate Protocol Response when signing required by client https://bugzilla.samba.org/show_bug.cgi?id=11103 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Steve French <smfrench@gmail.com>
This commit is contained in:
parent
7a46156569
commit
1cea6e5b6f
@ -221,7 +221,8 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
|
||||
}
|
||||
|
||||
security_mode = SMB2_NEGOTIATE_SIGNING_ENABLED;
|
||||
if (lp_server_signing() == SMB_SIGNING_REQUIRED) {
|
||||
if (lp_server_signing() == SMB_SIGNING_REQUIRED ||
|
||||
(in_security_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED)) {
|
||||
security_mode |= SMB2_NEGOTIATE_SIGNING_REQUIRED;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,9 @@ static NTSTATUS smbd_smb2_auth_generic_return(struct smbXsrv_session *session,
|
||||
struct smbXsrv_connection *xconn = smb2req->xconn;
|
||||
|
||||
if ((in_security_mode & SMB2_NEGOTIATE_SIGNING_REQUIRED) ||
|
||||
lp_server_signing() == SMB_SIGNING_REQUIRED) {
|
||||
lp_server_signing() == SMB_SIGNING_REQUIRED ||
|
||||
(xconn->smb2.server.security_mode &
|
||||
SMB2_NEGOTIATE_SIGNING_REQUIRED)) {
|
||||
x->global->signing_required = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user