aboutsummaryrefslogtreecommitdiff
path: root/portable
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2018-05-28 15:06:46 -0700
committerRuss Allbery <eagle@eyrie.org>2018-05-28 15:06:46 -0700
commitf3f09aab44117d8eb97811421b2685c295d3d585 (patch)
treec87b8e95690c2298777c718b543ffd4c78176bee /portable
parentba0bc0725e4b6f33280f6ac1edaecf8cc10616f3 (diff)
Pass realm to krb5_appdefault_* functions
When getting configuration values from krb5.conf, pass the default local realm into the Kerberos appdefault functions. This will produce more correct results with krb5.conf files that specify wallet configuration for multiple realms.
Diffstat (limited to 'portable')
-rw-r--r--portable/krb5.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/portable/krb5.h b/portable/krb5.h
index 63a2e9f..d8884a7 100644
--- a/portable/krb5.h
+++ b/portable/krb5.h
@@ -71,6 +71,15 @@ void krb5_appdefault_string(krb5_context, const char *, const krb5_data *,
#endif
/*
+ * MIT-specific. The Heimdal documentation says to use free(), but that
+ * doesn't actually make sense since the memory is allocated inside the
+ * Kerberos library. Use krb5_xfree instead.
+ */
+#ifndef HAVE_KRB5_FREE_DEFAULT_REALM
+# define krb5_free_default_realm(c, r) krb5_xfree(r)
+#endif
+
+/*
* krb5_{get,free}_error_message are the preferred APIs for both current MIT
* and current Heimdal, but there are tons of older APIs we may have to fall
* back on for earlier versions.