aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 19:30:54 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 19:30:54 -0700
commitf5d8568f66a66511eb4f38ef985216761fa1bb01 (patch)
tree348c803c19f46fe5150d50db34dff6f2e8580e9b /client
parent30220b381ac2a5c804f017c91324115670cad43a (diff)
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.
Diffstat (limited to 'client')
-rw-r--r--client/srvtab.c5
1 files changed, 5 insertions, 0 deletions
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 <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
* 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;