Blame SOURCES/mod_auth_kerb-5.4-httpd24.patch

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