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>
Tue, 13 Dec 2022 23:48:48 +0000 (00:48 +0100)
commit8f40d9b7dd280920dbbd41614a48eac918e2bcc8
treedc05e3fe1d149882a5a4f8dd3a642b034fd33328
parent86834042a187e7ef0c805b4a2fbe4d63b6437794
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>
[jsutton@samba.org Adapted to older db-glue code]
source4/kdc/db-glue.c