SOURCES: iptables-geoip-dbpath.patch (NEW) - FHS compatible path

glen glen at pld-linux.org
Tue Jan 15 16:37:08 CET 2008


Author: glen                         Date: Tue Jan 15 15:37:08 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- FHS compatible path

---- Files affected:
SOURCES:
   iptables-geoip-dbpath.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/iptables-geoip-dbpath.patch
diff -u /dev/null SOURCES/iptables-geoip-dbpath.patch:1.1
--- /dev/null	Tue Jan 15 16:37:09 2008
+++ SOURCES/iptables-geoip-dbpath.patch	Tue Jan 15 16:37:03 2008
@@ -0,0 +1,40 @@
+--- iptables-1.3.8/extensions/libipt_geoip.c~	2008-01-15 17:31:35.000000000 +0200
++++ iptables-1.3.8/extensions/libipt_geoip.c	2008-01-15 17:33:33.028250319 +0200
+@@ -81,13 +81,13 @@
+    u_int16_t db_cc = 0;
+    u_int16_t db_nsubnets = 0;
+ 
+-   if ((ixfd = fopen("/var/geoip/geoipdb.idx", "r")) == NULL) {
+-         perror("/var/geoip/geoipdb.idx");
++   if ((ixfd = fopen("/var/lib/geoip/geoipdb.idx", "r")) == NULL) {
++         perror("/var/lib/geoip/geoipdb.idx");
+          exit_error(OTHER_PROBLEM,
+                "geoip match: cannot open geoip's database index file");               
+    }
+    
+-   stat("/var/geoip/geoipdb.idx", &buf);
++   stat("/var/lib/geoip/geoipdb.idx", &buf);
+    idxsz = buf.st_size/sizeof(struct geoip_index);
+    index = (struct geoip_index *)malloc(buf.st_size);
+ 
+@@ -103,8 +103,8 @@
+ 
+    fclose(ixfd);
+ 
+-   if ((dbfd = fopen("/var/geoip/geoipdb.bin", "r")) == NULL) {
+-      perror("/var/geoip/geoipdb.bin");
++   if ((dbfd = fopen("/var/lib/geoip/geoipdb.bin", "r")) == NULL) {
++      perror("/var/lib/geoip/geoipdb.bin");
+       exit_error(OTHER_PROBLEM,
+             "geoip match: cannot open geoip's database file");
+    }
+--- iptables-1.3.8/extensions/libipt_geoip.man~	2008-01-15 17:31:35.000000000 +0200
++++ iptables-1.3.8/extensions/libipt_geoip.man	2008-01-15 17:33:58.176171011 +0200
+@@ -11,5 +11,5 @@
+ .P
+ The only extra files you need is a binary db (geoipdb.bin) & its index file (geoipdb.idx).
+ Both files are generated from a countries & subnets database with the csv2bin tool,
+-available at http://people.netfilter.org/peejix/geoip/. Both files MUST also be moved in /var/geoip/
+-as the shared library is statically looking for that pathname (ex.: /var/geoip/geoipdb.bin).
++available at http://people.netfilter.org/peejix/geoip/. Both files MUST also be moved in /var/lib/geoip/
++as the shared library is statically looking for that pathname (ex.: /var/lib/geoip/geoipdb.bin).
================================================================


More information about the pld-cvs-commit mailing list