diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | portable/gssapi.h | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 2506bd6..efce482 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ AC_CHECK_DECLS([GSS_KRB5_MECHANISM], [], [AC_CHECK_DECLS([gss_mech_krb5], [], [AC_LIBOBJ([gssapi-mech])], [RRA_INCLUDES_GSSAPI])], [RRA_INCLUDES_GSSAPI]) -AC_CHECK_FUNCS([gss_krb5_ccache_name gss_krb5_import_cred]) +AC_CHECK_FUNCS([gss_krb5_ccache_name gss_krb5_import_cred gss_oid_equal]) RRA_LIB_GSSAPI_RESTORE dnl Check for libevent, used by the server. diff --git a/portable/gssapi.h b/portable/gssapi.h index 5500a31..82b430c 100644 --- a/portable/gssapi.h +++ b/portable/gssapi.h @@ -23,6 +23,7 @@ #define PORTABLE_GSSAPI_H 1 #include <config.h> +#include <portable/system.h> #ifdef HAVE_GSSAPI_GSSAPI_H # include <gssapi/gssapi.h> @@ -53,4 +54,14 @@ extern const gss_OID_desc * const gss_mech_krb5; # define GSS_KRB5_MECHANISM gss_mech_krb5 #endif +/* + * Older versions of Heimdal are missing gss_oid_equal. Replace with an + * expression to check the struct members directly. + */ +#ifndef HAVE_GSS_OID_EQUAL +# define gss_oid_equal(x, y) \ + ((x)->length == (y)->length && \ + memcmp((x)->elements, (y)->elements, (x)->length) == 0) +#endif + #endif /* PORTABLE_GSSAPI_H */ |