diff options
author | Karl Ramm <kcr@1ts.org> | 2013-08-08 02:21:17 -0400 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2013-08-08 02:21:17 -0400 |
commit | 43bb0b4cedda5d60f9dc150c9b8331419a14d4b2 (patch) | |
tree | 737350cebc18e3e937b12cb6d8fdfbb28c4be962 | |
parent | 32da3192e9169118365a236ac8ccd1bf982df020 (diff) |
autoconf check for krb5_free_unparsed_name
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | server/kstuff.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 647107e..af787af 100644 --- a/configure.ac +++ b/configure.ac @@ -273,7 +273,7 @@ AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random) AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid etext) AC_CHECK_FUNCS(krb_get_err_text krb_log) AC_CHECK_FUNCS(krb5_free_data krb5_c_make_checksum krb5_cc_set_default_name) -AC_CHECK_FUNCS(krb5_crypto_init krb5_c_decrypt) +AC_CHECK_FUNCS(krb5_crypto_init krb5_c_decrypt krb5_free_unparsed_name) AC_MSG_CHECKING(krb5_auth_con_getauthenticator out argument type) AC_CACHE_VAL(ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer, [ diff --git a/server/kstuff.c b/server/kstuff.c index b2cf4c5..5bd9d3b 100644 --- a/server/kstuff.c +++ b/server/kstuff.c @@ -413,11 +413,19 @@ ZCheckSrvAuthentication(ZNotice_t *notice, syslog(LOG_WARNING, "ZCheckSrvAuthentication: name mismatch: '%s' vs '%s'", name, sender); krb5_auth_con_free(Z_krb5_ctx, authctx); +#ifdef HAVE_KRB5_FREE_UNPARSED_NAME krb5_free_unparsed_name(Z_krb5_ctx, name); +#else + free(name); +#endif free(authbuf); return ZAUTH_FAILED; } +#ifdef HAVE_KRB5_FREE_UNPARSED_NAME krb5_free_unparsed_name(Z_krb5_ctx, name); +#else + free(name); +#endif free(authbuf); /* HOLDING: authctx */ |