aklog: Use HAVE_ENCODE_KRB5_ENC_TKT_PART for aklog impersonate 25/13825/6
authorYadavendra Yadav <yadayada@in.ibm.com>
Wed, 28 Aug 2019 10:55:49 +0000 (15:55 +0530)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 9 Sep 2019 04:34:07 +0000 (00:34 -0400)
commit6559297610de0f71c9050f3582d4d146e0cc1f3c
tree6029a9ee96e81b8cb95037b4172b7f722099ffb2
parentd1e90b82ebb2685cbac3ecb3fd99136328b35357
aklog: Use HAVE_ENCODE_KRB5_ENC_TKT_PART for aklog impersonate

In get_credv5_akimpersonate we use HAVE_ENCODE_KRB5_ENC_TKT which is not
defined, due to this we always return -1 from this routine for non
Heimdal case. We have a another define i.e
HAVE_ENCODE_KRB5_ENC_TKT_PART which is defined if
encode_krb5_enc_tkt_part function is present. In current code
encode_krb5_enc_tkt_part is called from krb5_encrypt_tkt_part and
krb5_encrypt_tkt_part is called from get_credv5_akimpersonate for non
Heimdal case. So we should change HAVE_ENCODE_KRB5_ENC_TKT to
HAVE_ENCODE_KRB5_ENC_TKT_PART.
Also while we're here, add a declaration for the internal function
encode_krb5_ticket, so we can build this newly-enabled code without
warnings.

Change-Id: I8f740e319ad279e284efaa407e6f92d0dc7a1bf6
Reviewed-on: https://gerrit.openafs.org/13825
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
src/aklog/aklog.c