diff options
author | Thibaut Notteboom <tib@tibux.org> | 2013-02-10 01:36:50 -0600 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-02-14 00:26:35 -0600 |
commit | 7f2f69966e97765c8fd54a70a29e8cafe006028e (patch) | |
tree | 9d04f00e3135ad7522e12062c6e5e86ad535e75f /network/mod_auth_kerb/mod_auth_kerb.c.patch | |
parent | c2b1f1137e757b3a3f21e7c6dda333b058e84e85 (diff) | |
download | slackbuilds-7f2f69966e97765c8fd54a70a29e8cafe006028e.tar.gz |
network/mod_auth_kerb: Added (Kerberos Module for Apache)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/mod_auth_kerb/mod_auth_kerb.c.patch')
-rw-r--r-- | network/mod_auth_kerb/mod_auth_kerb.c.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/network/mod_auth_kerb/mod_auth_kerb.c.patch b/network/mod_auth_kerb/mod_auth_kerb.c.patch new file mode 100644 index 0000000000..cc466fd605 --- /dev/null +++ b/network/mod_auth_kerb/mod_auth_kerb.c.patch @@ -0,0 +1,71 @@ +--- src/mod_auth_kerb.c.orig 2012-06-24 19:10:03.578437625 +0200 ++++ src/mod_auth_kerb.c 2012-06-24 19:12:42.043441805 +0200 +@@ -89,6 +89,7 @@ + #include <krb5.h> + #ifdef HEIMDAL + # include <gssapi.h> ++# include <gssapi/gssapi_krb5.h> + #else + # include <gssapi/gssapi.h> + # include <gssapi/gssapi_generic.h> +@@ -179,6 +179,16 @@ static apr_global_mutex_t *s4u2proxy_loc + #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 + ***************************************************************************/ +@@ -383,7 +393,11 @@ cmd_delegationlock(cmd_parms *cmd, void + } + + 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]; +@@ -394,7 +408,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); +@@ -1860,8 +1876,8 @@ already_succeeded(request_rec *r, char * + char keyname[1024]; + + snprintf(keyname, sizeof(keyname) - 1, +- "mod_auth_kerb::connection::%s::%ld", r->connection->remote_ip, +- r->connection->id); ++ "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) + return NULL; +@@ -2014,7 +2030,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); + } + |