CVE-2022-37966 s4:kdc: Move supported enc-type handling out of samba_kdc_message2entr...
authorAndrew Bartlett <abartlet@samba.org>
Wed, 23 Mar 2022 00:07:29 +0000 (13:07 +1300)
committerStefan Metzmacher <metze@samba.org>
Wed, 14 Dec 2022 10:28:16 +0000 (10:28 +0000)
commit3dec660ae2bd1067ea2314917197f44aedef9ba3
tree5844359b3b8bc2f542e467bf677e43baee618693
parentc09df344f0e37d48768ec606cbeb25b0f6250a24
CVE-2022-37966 s4:kdc: Move supported enc-type handling out of samba_kdc_message2entry_keys()

By putting this in the caller we potentially allow samba_kdc_message2entry_keys()
to be reused by a non-KDC caller.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 29eb7e2488e2c55ceacb859a57836a08cbb7f8e8)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237

[jsutton@samba.org Adapted to older code without support for Protected
 Users or older keys; kept still-needed 'kdc_db_ctx'
 samba_kdc_message2entry_keys() parameter]
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/kdc/db-glue.c