summaryrefslogtreecommitdiff
path: root/www/ap-auth-kerb
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2014-08-05 18:47:31 +0000
committerspz <spz@pkgsrc.org>2014-08-05 18:47:31 +0000
commitd800e21f5b41f23766246aee9005e7e6c959df0b (patch)
treec17a643facdce3a242cd18e5d2d01a43b9ccbae0 /www/ap-auth-kerb
parent64d9b6429997d9970cbfa2e8a85ba20f0384cb1f (diff)
downloadpkgsrc-d800e21f5b41f23766246aee9005e7e6c959df0b.tar.gz
add support for apache24
Diffstat (limited to 'www/ap-auth-kerb')
-rw-r--r--www/ap-auth-kerb/Makefile4
-rw-r--r--www/ap-auth-kerb/distinfo4
-rw-r--r--www/ap-auth-kerb/patches/patch-aa64
3 files changed, 66 insertions, 6 deletions
diff --git a/www/ap-auth-kerb/Makefile b/www/ap-auth-kerb/Makefile
index 824938b6347..b0de109ba81 100644
--- a/www/ap-auth-kerb/Makefile
+++ b/www/ap-auth-kerb/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2014/06/10 15:22:14 joerg Exp $
+# $NetBSD: Makefile,v 1.11 2014/08/05 18:47:31 spz Exp $
DISTNAME= mod_auth_kerb-5.4
PKGNAME= ${DISTNAME:S/mod/${APACHE_PKG_PREFIX}/:S/_/-/g}
@@ -10,7 +10,7 @@ HOMEPAGE= http://modauthkerb.sourceforge.net/
COMMENT= Module to allow Apache authentication using Kerberos
LICENSE= modified-bsd
-PKG_APACHE_ACCEPTED= apache22
+PKG_APACHE_ACCEPTED= apache22 apache24
CONFLICTS= ap-auth-kerb-[0-9]*
diff --git a/www/ap-auth-kerb/distinfo b/www/ap-auth-kerb/distinfo
index e9dde658411..11a83077ffa 100644
--- a/www/ap-auth-kerb/distinfo
+++ b/www/ap-auth-kerb/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2011/01/25 11:17:43 markd Exp $
+$NetBSD: distinfo,v 1.5 2014/08/05 18:47:31 spz Exp $
SHA1 (mod_auth_kerb-5.4.tar.gz) = 22673081419bc2e98789fe2f998968c0cf10c2d4
RMD160 (mod_auth_kerb-5.4.tar.gz) = 13bebc9f5b77b11b1a3cd3a1197a7535e541037c
Size (mod_auth_kerb-5.4.tar.gz) = 93033 bytes
-SHA1 (patch-aa) = e261b01d3e97e1f382b1269c7fb1032a58891708
+SHA1 (patch-aa) = 64c80c3fe355d114bdd590f7564725354c39567a
diff --git a/www/ap-auth-kerb/patches/patch-aa b/www/ap-auth-kerb/patches/patch-aa
index 4f24da461f4..e7f431cca60 100644
--- a/www/ap-auth-kerb/patches/patch-aa
+++ b/www/ap-auth-kerb/patches/patch-aa
@@ -1,10 +1,12 @@
-$NetBSD: patch-aa,v 1.1 2011/01/25 11:17:43 markd Exp $
+$NetBSD: patch-aa,v 1.2 2014/08/05 18:47:31 spz Exp $
recent heimdal's dont implicitly include mech headers
so include explicitly.
+Fixes for 2.4 API from https://github.com/pld-linux/apache-mod_auth_kerb/blob/master/mod_auth_kerb-apache24.patch
+
--- src/mod_auth_kerb.c.orig 2008-12-04 10:14:03.000000000 +0000
-+++ src/mod_auth_kerb.c
++++ src/mod_auth_kerb.c 2014-07-18 07:11:17.000000000 +0000
@@ -89,6 +89,7 @@
#include <krb5.h>
#ifdef HEIMDAL
@@ -13,3 +15,61 @@ so include explicitly.
#else
# include <gssapi/gssapi.h>
# include <gssapi/gssapi_generic.h>
+@@ -147,6 +148,15 @@ module auth_kerb_module;
+ #define PROXYREQ_PROXY STD_PROXY
+ #endif
+
++#if MODULE_MAGIC_NUMBER_MAJOR >= 20100606
++/* 2.4.x or later */
++#define WITH_HTTPD24 1
++#define client_ip(r) ((r)->useragent_ip)
++APLOG_USE_MODULE(auth_kerb);
++#else
++#define client_ip(r) ((r)->connection->remote_ip)
++#endif
++
+ /***************************************************************************
+ Auth Configuration Structure
+ ***************************************************************************/
+@@ -348,7 +358,11 @@ krb5_save_realms(cmd_parms *cmd, void *v
+ }
+
+ static void
+-log_rerror(const char *file, int line, int level, int status,
++log_rerror(const char *file, int line,
++#ifdef WITH_HTTPD24
++ int module_index,
++#endif
++ int level, int status,
+ const request_rec *r, const char *fmt, ...)
+ {
+ char errstr[1024];
+@@ -359,7 +373,9 @@ log_rerror(const char *file, int line, i
+ va_end(ap);
+
+
+-#ifdef STANDARD20_MODULE_STUFF
++#if defined(WITH_HTTPD24)
++ ap_log_rerror(file, line, module_index, level, status, r, "%s", errstr);
++#elif defined(STANDARD20_MODULE_STUFF)
+ ap_log_rerror(file, line, level | APLOG_NOERRNO, status, r, "%s", errstr);
+ #else
+ ap_log_rerror(file, line, level | APLOG_NOERRNO, r, "%s", errstr);
+@@ -1555,7 +1571,7 @@ already_succeeded(request_rec *r, char *
+ char keyname[1024];
+
+ snprintf(keyname, sizeof(keyname) - 1,
+- "mod_auth_kerb::connection::%s::%ld", r->connection->remote_ip,
++ "mod_auth_kerb::connection::%s::%ld", client_ip(r),
+ r->connection->id);
+
+ if (apr_pool_userdata_get((void**)&conn_data, keyname, r->connection->pool) != 0)
+@@ -1709,7 +1725,7 @@ kerb_authenticate_user(request_rec *r)
+ prevauth->last_return = ret;
+ snprintf(keyname, sizeof(keyname) - 1,
+ "mod_auth_kerb::connection::%s::%ld",
+- r->connection->remote_ip, r->connection->id);
++ client_ip(r), r->connection->id);
+ apr_pool_userdata_set(prevauth, keyname, NULL, r->connection->pool);
+ }
+