From f5d8568f66a66511eb4f38ef985216761fa1bb01 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 17 May 2020 19:30:54 -0700 Subject: Fix compilation with Heimdal Add a missing configure probe for krb5_xfree. If krb5_524_conv_principal is not available, return an error if asked to create a srvtab. (This function has been removed in current Heimdal.) Adjust the test suite to handle this case. --- client/srvtab.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client') diff --git a/client/srvtab.c b/client/srvtab.c index 2b600c2..c0c5c40 100644 --- a/client/srvtab.c +++ b/client/srvtab.c @@ -2,6 +2,7 @@ * Implementation of srvtab handling for the wallet client. * * Written by Russ Allbery + * Copyright 2020 Russ Allbery * Copyright 2007, 2008, 2010 * The Board of Trustees of the Leland Stanford Junior University * @@ -65,10 +66,14 @@ write_srvtab(krb5_context ctx, const char *srvtab, const char *principal, krb5_kt_close(ctx, kt); /* Convert the principal to a Kerberos v4 principal. */ +#ifdef HAVE_KRB5_524_CONV_PRINCIPAL ret = krb5_524_conv_principal(ctx, princ, aname, inst, realm); if (ret != 0) die_krb5(ctx, ret, "error converting principal %s to Kerberos v4", principal); +#else + die("Not built with Kerberos v4 support"); +#endif /* Assemble the srvtab data. */ length = 0; -- cgit v1.2.3