s4:kdc/db-glue: allow invalid kvno numbers in samba_kdc_trust_message2entry()
authorStefan Metzmacher <metze@samba.org>
Fri, 10 Apr 2015 20:31:20 +0000 (20:31 +0000)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2015 16:38:20 +0000 (18:38 +0200)
commitf05c0bc6397d783681fb0b4a82677493e96f3398
tree5becc4a88aa66281651dccc7726a54698ecd9ece
parentcbe9fed248a85e3ab57df63656204941925f8131
s4:kdc/db-glue: allow invalid kvno numbers in samba_kdc_trust_message2entry()

We should fallback to the current password if the trusted KDC used a wrong kvno.

After commit 6f8b868a29fe47a3b589616fde97099829933ce0, we always have the
previous password filled. With the trust creation we typically don't
have a TRUST_AUTH_TYPE_VERSION in the current nor in the previous array.
This means current_kvno is 0. And now previous_kvno is 255.

A FreeIPA/MIT KDC uses kvno=1 in the referral ticket, which triggered
the 'Request for unknown kvno 1 - current kvno is 0' case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c