/[smecontribs]/rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-bz10739.patch
ViewVC logotype

Annotation of /rpms/smeserver-xt_geoip/contribs9/smeserver-xt_geoip-1.0.1-bz10739.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Feb 19 02:35:44 2019 UTC (5 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-xt_geoip-1_0_1-8_el6_sme, smeserver-xt_geoip-1_0_1-23_el6_sme, smeserver-xt_geoip-1_0_1-26_el6_sme, smeserver-xt_geoip-1_0_1-25_el6_sme, smeserver-xt_geoip-1_0_1-21_el6_sme, smeserver-xt_geoip-1_0_1-19_el6_sme, smeserver-xt_geoip-1_0_1-18_el6_sme, smeserver-xt_geoip-1_0_1-20_el6_sme, smeserver-xt_geoip-1_0_1-11_el6_sme, smeserver-xt_geoip-1_0_1-17_el6_sme, smeserver-xt_geoip-1_0_1-7_el6_sme, smeserver-xt_geoip-1_0_1-6_el6_sme, smeserver-xt_geoip-1_0_1-9_el6_sme, smeserver-xt_geoip-1_0_1-16_el6_sme, smeserver-xt_geoip-1_0_1-13_el6_sme, smeserver-xt_geoip-1_0_1-10_el6_sme, smeserver-xt_geoip-1_0_1-14_el6_sme, smeserver-xt_geoip-1_0_1-15_el6_sme, smeserver-xt_geoip-1_0_1-24_el6_sme, smeserver-xt_geoip-1_0_1-12_el6_sme, smeserver-xt_geoip-1_0_1-22_el6_sme, HEAD
* Mon Feb 18 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.1-6.sme
- fix unable to load iptables rules [SME: 10739]
  fix warning localtime
  fix warning "enabled" isn't numeric in numeric eq (==)

1 jpp 1.1 diff -Nur smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip
2     --- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip 2019-02-18 21:13:42.739000000 -0500
3     +++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/40Xt_Geoip 2019-02-18 21:31:14.383000000 -0500
4     @@ -6,9 +6,10 @@
5     chomp($KERNEL);
6     my $PATH_MODULE = "/lib/modules/$KERNEL/extra/xt_geoip.ko";
7     my $PATH2_MODULE = "/lib/modules/$KERNEL/weak-updates/xt_geoip.ko";
8     + my $PATH3_MODULE = "/lib/modules/$KERNEL/weak-updates/xtables-addons/xt_geoip.ko";
9     if ($GP eq 'enabled' and $BC ne '')
10     {
11     - if (-s $PATH_MODULE || -s $PATH2_MODULE)
12     + if (-s $PATH_MODULE || -s $PATH2_MODULE || -s $PATH3_MODULE)
13     {
14     $OUT .= " ## xtables-addons GEOIP ##\n";
15     $OUT .= " /sbin/iptables -A INPUT -m geoip --src-cc $BC -j ULOG --ulog-prefix \"GeoIP BAN: ALL\"\n";
16     diff -Nur smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm
17     --- smeserver-xt_geoip-1.0.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2019-02-18 21:13:42.743000000 -0500
18     +++ smeserver-xt_geoip-1.0.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2019-02-18 21:30:16.327000000 -0500
19     @@ -139,7 +139,7 @@
20    
21     sub get_geoip
22     {
23     - return $db->get_prop("masq", "GeoIP");
24     + return $db->get_prop("masq", "GeoIP") || 'disabled';
25     }
26    
27     =head2 get_stat_geoip
28     @@ -150,7 +150,7 @@
29     sub get_stat_geoip
30     {
31     my $fm = shift;
32     - if ( get_geoip() == 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) {
33     + if ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) {
34     return $fm->localise('ERROR_STATUS_GEOIP');
35     } else {
36     return '';
37     @@ -163,7 +163,8 @@
38     sub get_date_update
39     {
40     my $file = "/usr/share/xt_geoip/LE/A1.iv4";
41     - return strftime("%Y/%m/%d %H:%M", localtime( (stat($file))[9] )) || '';
42     + my $filetime = ( -e $file ) ? (stat($file))[9] : 0;
43     + return strftime("%Y/%m/%d %H:%M", localtime( $filetime )) || '';
44     }
45    
46     =head2 change_settings

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed