_kdc_find_etype: prefer default salt for preauth
commit76bee4df58994d45852e2e8d5da7ec09bdc6f5d4
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 30 Jul 2013 14:46:20 +0000 (30 10:46 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 30 Jul 2013 18:18:03 +0000 (30 14:18 -0400)
tree13866bd0df3bea82646809cb222ceaabbc0c5a40
parent33a3a172ad3cf53764388efb8767ce5793b49a41
_kdc_find_etype: prefer default salt for preauth

if the query is "preauth" and the caller is seeking a Key, search
try to find a Key that has the default salt but do not exclude keys
that have a non-default salt.

Move the assignment of 'ret' and 'enctype' before the preauth
default salt test.  If the only key of the given type is the non-default
salt key, it should be used.

If the caller is not seeking a Key, do not bother with the preauth
test at all since the Key itself doesn't matter and we are simply
seeking an enctype.

Change-Id: I7cd37c579c0bfdd88bccfbc9eb5e5f55cd1910cb
kdc/kerberos5.c