From 82454a9acd307f5458f3c1f8d2a185ca0ca1e322 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Wed, 20 Jan 2016 13:16:51 +0100 Subject: Compatibility for httpd-2.2.x. The ap_set_flag_slot_char and ap_hook_check_access are not available on 2.2. --- mod_lookup_identity.c | 8 ++++++-- mod_lookup_identity.spec | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mod_lookup_identity.c b/mod_lookup_identity.c index 4b91707..849366a 100644 --- a/mod_lookup_identity.c +++ b/mod_lookup_identity.c @@ -69,7 +69,7 @@ typedef struct lookup_identity_config { apr_hash_t * output_user_attr_sep; apr_hash_t * output_user_attr_iter; int dbus_timeout; - signed char lookup_by_certificate; + int lookup_by_certificate; #endif } lookup_identity_config; @@ -738,7 +738,7 @@ static const command_rec directives[] = { AP_INIT_TAKE23("LookupUserAttr", set_user_attr, NULL, RSRC_CONF | ACCESS_CONF, "Additional user attribute (attr, note/variable name, separator)"), AP_INIT_TAKE2("LookupUserAttrIter", set_user_attr_iter, NULL, RSRC_CONF | ACCESS_CONF, "Additional user attributes (attr, note/variable name)"), AP_INIT_TAKE1("LookupDbusTimeout", ap_set_int_slot, (void*)APR_OFFSETOF(lookup_identity_config, dbus_timeout), RSRC_CONF | ACCESS_CONF, "Timeout for sssd dbus calls (in ms)"), - AP_INIT_FLAG("LookupUserByCertificate", ap_set_flag_slot_char, (void*)APR_OFFSETOF(lookup_identity_config, lookup_by_certificate), RSRC_CONF | ACCESS_CONF, "Use org.freedesktop.sssd.infopipe.Users.FindByCertificate to lookup user identity"), + AP_INIT_FLAG("LookupUserByCertificate", ap_set_flag_slot, (void*)APR_OFFSETOF(lookup_identity_config, lookup_by_certificate), RSRC_CONF | ACCESS_CONF, "Use org.freedesktop.sssd.infopipe.Users.FindByCertificate to lookup user identity"), #endif { NULL } }; @@ -747,8 +747,12 @@ static void register_hooks(apr_pool_t * pool) { #ifndef NO_USER_ATTR static const char * const access_succ[] = {"mod_authz_core.c", NULL}; static const char * const access_pred[] = {"mod_ssl.c", NULL}; +#ifdef AP_AUTH_INTERNAL_PER_CONF ap_hook_check_access(lookup_user_by_certificate, access_pred, access_succ, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF); +#else + ap_hook_access_checker(lookup_user_by_certificate, access_pred, access_succ, APR_HOOK_MIDDLE); +#endif #endif static const char * const fixup_succ[] = {"mod_headers.c", NULL}; diff --git a/mod_lookup_identity.spec b/mod_lookup_identity.spec index ac58223..bb85840 100644 --- a/mod_lookup_identity.spec +++ b/mod_lookup_identity.spec @@ -7,7 +7,7 @@ Summary: Apache module to retrieve additional information about the authenticated user Name: mod_lookup_identity -Version: 0.9.4 +Version: 0.9.5 Release: 1%{?dist} License: ASL 2.0 Group: System Environment/Daemons @@ -63,6 +63,9 @@ install -Dp -m 0644 lookup_identity.confx $RPM_BUILD_ROOT%{_httpd_confdir}/looku %{_httpd_moddir}/*.so %changelog +* Wed Jan 20 2016 Jan Pazdziora - 0.9.5-1 +- Fix LookupUserByCertificate httpd-2.2 compatibility issue. + * Wed Jan 20 2016 Jan Pazdziora - 0.9.4-1 - Added LookupUserOutput headers and headers-base64. -- cgit