From 2b36af83f68f588806a73a2688890ab9742242ad Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 10 Jun 2021 16:03:15 +0000 Subject: [PATCH] s3:smbd: let smb2srv_session_lookup_global() clear the signing/encryption_flags When we make use of this we only in order to provide the correct error codes anyway. This actually fixes even more error codes. Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- selftest/knownfail.d/smb2.session | 11 +++++++++++ source3/smbd/smbXsrv_session.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/selftest/knownfail.d/smb2.session b/selftest/knownfail.d/smb2.session index 3cdc14d1e7e..d5a0770c3a4 100644 --- a/selftest/knownfail.d/smb2.session +++ b/selftest/knownfail.d/smb2.session @@ -1,4 +1,10 @@ ^samba3.smb2.session.*bind_negative_smb3encGtoC +^samba3.smb2.session.plain.bind_negative_smb202.nt4_dc +^samba3.smb2.session.plain.bind_negative_smb210d.nt4_dc +^samba3.smb2.session.plain.bind_negative_smb2to3d.nt4_dc +^samba3.smb2.session.plain.bind_negative_smb3to2d.nt4_dc +^samba3.smb2.session.plain.bind_negative_smb3to3d.nt4_dc +^samba3.smb2.session.enc.bind_negative_smb3to3d.nt4_dc ^samba3.smb2.session.ntlm.bind_negative_smb202.ad_dc ^samba3.smb2.session.ntlm.bind_negative_smb210s.ad_dc ^samba3.smb2.session.ntlm.bind_negative_smb210d.ad_dc @@ -17,3 +23,8 @@ ^samba3.smb2.session.krb5.bind_negative_smb3to2d.ad_dc ^samba3.smb2.session.krb5.bind_negative_smb3to3s.ad_dc ^samba3.smb2.session.krb5.bind_negative_smb3to3d.ad_dc +^samba3.smb2.session.krb5.bind_negative_smb202.ad_member_idmap_rid +^samba3.smb2.session.krb5.bind_negative_smb210d.ad_member_idmap_rid +^samba3.smb2.session.krb5.bind_negative_smb2to3d.ad_member_idmap_rid +^samba3.smb2.session.krb5.bind_negative_smb3to2d.ad_member_idmap_rid +^samba3.smb2.session.krb5.bind_negative_smb3to3d.ad_member_idmap_rid diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c index 5ab453664f2..70a45a95533 100644 --- a/source3/smbd/smbXsrv_session.c +++ b/source3/smbd/smbXsrv_session.c @@ -2329,6 +2329,7 @@ NTSTATUS smb2srv_session_lookup_global(struct smbXsrv_client *client, return NT_STATUS_NO_MEMORY; } session->global->signing_key->blob = session->global->signing_key_blob; + session->global->signing_flags = 0; status = smb2_signing_key_cipher_create(session->global, session->global->encryption_cipher, @@ -2340,6 +2341,7 @@ NTSTATUS smb2srv_session_lookup_global(struct smbXsrv_client *client, return NT_STATUS_NO_MEMORY; } session->global->decryption_key->blob = session->global->decryption_key_blob; + session->global->encryption_flags = 0; *_session = talloc_move(mem_ctx, &session); TALLOC_FREE(frame);