Blame SOURCES/mod_auth_kerb-5.4-httpd24.patch

0e5650
0e5650
Fixes for 2.4 API.
0e5650
0e5650
--- mod_auth_kerb-5.4/src/mod_auth_kerb.c.httpd24
0e5650
+++ mod_auth_kerb-5.4/src/mod_auth_kerb.c
0e5650
@@ -179,6 +179,16 @@ static apr_global_mutex_t *s4u2proxy_loc
0e5650
 #define PROXYREQ_PROXY STD_PROXY
0e5650
 #endif
0e5650
 
0e5650
+#if MODULE_MAGIC_NUMBER_MAJOR >= 20100606
0e5650
+/* 2.4.x or later */
0e5650
+#define WITH_HTTPD24 1
0e5650
+#define client_ip(r) ((r)->useragent_ip)
0e5650
+APLOG_USE_MODULE(auth_kerb);
0e5650
+#else
0e5650
+#define client_ip(r) ((r)->connection->remote_ip)
0e5650
+#define ap_unixd_set_global_mutex_perms unixd_set_global_mutex_perms
0e5650
+#endif
0e5650
+
0e5650
 /*************************************************************************** 
0e5650
  Auth Configuration Structure
0e5650
  ***************************************************************************/
0e5650
@@ -383,7 +393,11 @@ cmd_delegationlock(cmd_parms *cmd, void
0e5650
 }
0e5650
 
0e5650
 static void
0e5650
-log_rerror(const char *file, int line, int level, int status,
0e5650
+log_rerror(const char *file, int line, 
0e5650
+#ifdef WITH_HTTPD24
0e5650
+	   int module_index,
0e5650
+#endif
0e5650
+	   int level, int status,
0e5650
            const request_rec *r, const char *fmt, ...)
0e5650
 {
0e5650
    char errstr[1024];
0e5650
@@ -394,7 +408,9 @@ log_rerror(const char *file, int line, i
0e5650
    va_end(ap);
0e5650
 
0e5650
    
0e5650
-#ifdef STANDARD20_MODULE_STUFF
0e5650
+#if defined(WITH_HTTPD24)
0e5650
+   ap_log_rerror(file, line, module_index, level, status, r, "%s", errstr);
0e5650
+#elif defined(STANDARD20_MODULE_STUFF)
0e5650
    ap_log_rerror(file, line, level | APLOG_NOERRNO, status, r, "%s", errstr);
0e5650
 #else
0e5650
    ap_log_rerror(file, line, level | APLOG_NOERRNO, r, "%s", errstr);
0e5650
@@ -1860,8 +1876,8 @@ already_succeeded(request_rec *r, char *
0e5650
    char keyname[1024];
0e5650
 
0e5650
    snprintf(keyname, sizeof(keyname) - 1,
0e5650
-	"mod_auth_kerb::connection::%s::%ld", r->connection->remote_ip, 
0e5650
-	r->connection->id);
0e5650
+	    "mod_auth_kerb::connection::%s::%ld", client_ip(r), 
0e5650
+	    r->connection->id);
0e5650
 
0e5650
    if (apr_pool_userdata_get((void**)&conn_data, keyname, r->connection->pool) != 0)
0e5650
 	return NULL;
0e5650
@@ -2014,7 +2030,7 @@ kerb_authenticate_user(request_rec *r)
0e5650
        prevauth->last_return = ret;
0e5650
        snprintf(keyname, sizeof(keyname) - 1,
0e5650
            "mod_auth_kerb::connection::%s::%ld", 
0e5650
-	   r->connection->remote_ip, r->connection->id);
0e5650
+		client_ip(r), r->connection->id);
0e5650
        apr_pool_userdata_set(prevauth, keyname, NULL, r->connection->pool);
0e5650
    }
0e5650
 
0e5650
@@ -2073,7 +2089,7 @@ s4u2proxylock_create(server_rec *s, apr_
0e5650
     }
0e5650
 
0e5650
 #ifdef AP_NEED_SET_MUTEX_PERMS
0e5650
-    rc = unixd_set_global_mutex_perms(s4u2proxy_lock);
0e5650
+    rc = ap_unixd_set_global_mutex_perms(s4u2proxy_lock);
0e5650
     if (rc != APR_SUCCESS) {
0e5650
         ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s,
0e5650
                      "mod_auth_kerb: Parent could not set permissions "