File: apache24.patch

package info (click to toggle)
libapache-mod-auth-kerb 5.4-2.4
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 636 kB
  • sloc: ansic: 3,236; makefile: 92; sh: 4
file content (62 lines) | stat: -rw-r--r-- 2,025 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- a/src/mod_auth_kerb.c
+++ b/src/mod_auth_kerb.c
@@ -152,10 +152,14 @@
 #  endif
 #endif
 
-#ifdef STANDARD20_MODULE_STUFF
+#if defined(APLOG_USE_MODULE)
+APLOG_USE_MODULE(auth_kerb);
+#elif defined(STANDARD20_MODULE_STUFF)
 module AP_MODULE_DECLARE_DATA auth_kerb_module;
+# define client_ip remote_ip
 #else
 module auth_kerb_module;
+# define client_ip remote_ip
 #endif
 
 #ifdef STANDARD20_MODULE_STUFF
@@ -389,9 +393,14 @@ cmd_delegationlock(cmd_parms *cmd, void
     return NULL;
 }
 
+#ifdef APLOG_USE_MODULE
 static void
+log_rerror(const char *file, int line, int module_index, int level, int status,
+           const request_rec *r, const char *fmt, ...)
+#else
 log_rerror(const char *file, int line, int level, int status,
            const request_rec *r, const char *fmt, ...)
+#endif
 {
    char errstr[1024];
    va_list ap;
@@ -401,7 +410,9 @@ log_rerror(const char *file, int line, i
    va_end(ap);
 
    
-#ifdef STANDARD20_MODULE_STUFF
+#if defined(APLOG_USE_MODULE)
+   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);
@@ -1882,7 +1893,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", r->connection->client_ip,
 	r->connection->id);
 
    if (apr_pool_userdata_get((void**)&conn_data, keyname, r->connection->pool) != 0)
@@ -2044,7 +2055,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);
+	   r->connection->client_ip, r->connection->id);
        apr_pool_userdata_set(prevauth, keyname, NULL, r->connection->pool);
    }