File: 20_localhost_to_IP

package info (click to toggle)
libapache-mod-removeip 1.0b-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 124 kB
  • ctags: 19
  • sloc: ansic: 119; sh: 84; makefile: 75
file content (32 lines) | stat: -rw-r--r-- 1,573 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
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_localhost_to_IP.dpatch by Bertagaz <bertagaz@ptitcanardnoir.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch to replace the "localhsot" string in logs by a correct IP

@DPATCH@

diff -Nadur mod_removeip/libapache-mod-removeip/debian/trunk/apache1.3/mod_removeip.c mod_removeip-1.0b/apache1.3/mod_removeip.c
--- mod_removeip/libapache-mod-removeip/debian/trunk/apache1.3/mod_removeip.c	2006-08-12 22:08:28.000000000 +0200
+++ mod_removeip-1.0b/apache1.3/mod_removeip.c	2006-08-15 23:11:27.539638272 +0200
@@ -42,7 +42,7 @@
     if (!cfg->enable)
         return DECLINED;
 
-    r->connection->remote_ip = ap_pstrdup(r->connection->pool, "localhost");
+    r->connection->remote_ip = ap_pstrdup(r->connection->pool, "127.0.0.1");
     r->connection->remote_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
 
     return DECLINED;
diff -Nadur mod_removeip/libapache-mod-removeip/debian/trunk/apache2.0/mod_removeip.c mod_removeip-1.0b/apache2.0/mod_removeip.c
--- mod_removeip/libapache-mod-removeip/debian/trunk/apache2.0/mod_removeip.c	2006-08-12 22:08:28.000000000 +0200
+++ mod_removeip-1.0b/apache2.0/mod_removeip.c	2006-08-15 23:11:51.249033896 +0200
@@ -40,7 +40,7 @@
     if (!cfg->enable)
         return DECLINED;
 
-    r->connection->remote_ip = apr_pstrdup(r->connection->pool, "localhost");
+    r->connection->remote_ip = apr_pstrdup(r->connection->pool, "127.0.0.1");
     r->connection->remote_addr->sa.sin.sin_addr.s_addr = inet_addr("127.0.0.1");
 
     return DECLINED;