/[smecontribs]/rpms/smeserver-xt_geoip/contribs10/smeserver-xt_geoip-1.3.1-bz12291_module_state.patch
ViewVC logotype

Contents of /rpms/smeserver-xt_geoip/contribs10/smeserver-xt_geoip-1.3.1-bz12291_module_state.patch

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


Revision 1.1 - (show annotations) (download)
Wed Jan 11 19:07:58 2023 UTC (22 months, 2 weeks ago) by michel
Branch: MAIN
CVS Tags: smeserver-xt_geoip-1_3_1-18_el7_sme, smeserver-xt_geoip-1_3_1-20_el7_sme, smeserver-xt_geoip-1_3_1-21_el7_sme, smeserver-xt_geoip-1_3_1-19_el7_sme, HEAD
make: « clog » est à jour.

1 diff -urN smeserver-xt_geoip-1.3.1.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.3.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip
2 --- smeserver-xt_geoip-1.3.1.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2023-01-11 20:36:20.000000000 +0400
3 +++ smeserver-xt_geoip-1.3.1/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/xt_geoip 2023-01-11 22:35:41.280000000 +0400
4 @@ -50,11 +50,6 @@
5 </entry>
6
7 <entry>
8 - <base>ERROR_STATUS_GEOIP</base>
9 - <trans><![CDATA[ <font color="red">GEOIP filtering is <b>inactive</b></font> (iptables) ]]></trans>
10 - </entry>
11 -
12 - <entry>
13 <base>LABEL_BADCOUNTRIES_STATUS</base>
14 <trans>Current list of banished country codes : </trans>
15 </entry>
16 @@ -302,4 +297,19 @@
17 <trans><![CDATA[ <font color="red">GEOIP license key unavailable. Downloading is <b>inactive</b></font> ]]></trans>
18 </entry>
19
20 + <entry>
21 + <base>ERROR_MISSING_MODULE</base>
22 + <trans><![CDATA[ <font color="red">Module xt_geoip is missing. GeoIP based filtering is <b>inactive</b></font> ]]></trans>
23 + </entry>
24 +
25 + <entry>
26 + <base>ERROR_UNLOADED_MODULE</base>
27 + <trans><![CDATA[ <font color="red">Module xt_geoip not loaded. GeoIP based filtering is <b>inactive</b></font> ]]></trans>
28 + </entry>
29 +
30 + <entry>
31 + <base>ERROR_FILTER_CHAIN_MISSING</base>
32 + <trans><![CDATA[ <font color="red">Filtering chain XTGeoIP is not in use. GeoIP based filtering is <b>inactive</b></font> ]]></trans>
33 + </entry>
34 +
35 </lexicon>
36 diff -urN smeserver-xt_geoip-1.3.1.old/root/etc/e-smith/web/functions/xt_geoip smeserver-xt_geoip-1.3.1/root/etc/e-smith/web/functions/xt_geoip
37 --- smeserver-xt_geoip-1.3.1.old/root/etc/e-smith/web/functions/xt_geoip 2023-01-11 20:36:20.000000000 +0400
38 +++ smeserver-xt_geoip-1.3.1/root/etc/e-smith/web/functions/xt_geoip 2023-01-11 20:50:41.936000000 +0400
39 @@ -106,7 +106,6 @@
40 <label> </label>
41 </field>
42
43 -
44 <field type="literal" id="country_list_label" value="">
45 <description>COUNTRY_LIST_DESCRIPTION</description>
46 </field>
47 diff -urN smeserver-xt_geoip-1.3.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm smeserver-xt_geoip-1.3.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm
48 --- smeserver-xt_geoip-1.3.1.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2023-01-11 20:36:20.000000000 +0400
49 +++ smeserver-xt_geoip-1.3.1/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/xt_geoip.pm 2023-01-11 20:20:08.000000000 +0400
50 @@ -175,21 +175,27 @@
51 return $db->get_prop("$item", "$prop") || "disabled";
52 }
53
54 +
55 =head2 get_stat_geoip
56
57 -method to retrieve the status of geoip for the form
58 +method to retrieve the status of geoip (module and filtering) for the form
59 =cut
60
61 sub get_stat_geoip
62 {
63 my $fm = shift;
64 - if ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) {
65 - return $fm->localise('ERROR_STATUS_GEOIP');
66 + if ( system ( "/bin/test -f /lib/modules/`/bin/uname -r`/weak-updates/xtables-addons/xt_geoip.ko") != 0 ) {
67 + return $fm->localise('ERROR_MISSING_MODULE');
68 + } elsif ( system ( "/sbin/lsmod | grep 'xt_geoip' > /dev/null") != 0 ) {
69 + return $fm->localise('ERROR_UNLOADED_MODULE');
70 + } elsif ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'XTGeoIP' > /dev/null") != 0 ) {
71 + return $fm->localise('ERROR_FILTER_CHAIN_MISSING');
72 } else {
73 return '';
74 }
75 }
76
77 +
78 =head2 get_stat_license_key
79
80 method to retrieve the status of geoip license_key for the site
81 @@ -207,6 +213,7 @@
82
83 }
84
85 +
86 =head2 get_date_update
87 =cut
88
89 diff -urN smeserver-xt_geoip-1.3.1.old/root/usr/share/smanager/lib/SrvMngr/Controller/Xt_geoip.pm smeserver-xt_geoip-1.3.1/root/usr/share/smanager/lib/SrvMngr/Controller/Xt_geoip.pm
90 --- smeserver-xt_geoip-1.3.1.old/root/usr/share/smanager/lib/SrvMngr/Controller/Xt_geoip.pm 2023-01-11 20:36:20.000000000 +0400
91 +++ smeserver-xt_geoip-1.3.1/root/usr/share/smanager/lib/SrvMngr/Controller/Xt_geoip.pm 2023-01-11 19:50:19.000000000 +0400
92 @@ -256,9 +256,14 @@
93
94
95 sub get_stat_geoip {
96 +
97 my $c = shift;
98 - if ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'GeoIP' > /dev/null") != 0 ) {
99 - return $c->l('xtg_ERROR_STATUS_GEOIP');
100 + if ( system ( "/bin/test -f /lib/modules/`/bin/uname -r`/weak-updates/xtables-addons/xt_geoip.ko") != 0 ) {
101 + return $c->l('xtg_ERROR_MISSING_MODULE');
102 + } elsif ( system ( "/sbin/lsmod | grep 'xt_geoip' > /dev/null") != 0 ) {
103 + return $c->l('xtg_ERROR_UNLOADED_MODULE');
104 + } elsif ( get_geoip() eq 'enabled' && system ( "/sbin/iptables -L -n | grep 'XTGeoIP' > /dev/null") != 0 ) {
105 + return $c->l('xtg_ERROR_FILTER_CHAIN_MISSING');
106 } else {
107 return '';
108 }
109 @@ -312,7 +317,6 @@
110 return \@serv_rec;
111 }
112
113 -
114 sub get_srv_badcountries {
115 my ( $c, $name, $full ) = @_;
116
117 diff -urN smeserver-xt_geoip-1.3.1.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Xt_geoip/xt_geoip_en.lex smeserver-xt_geoip-1.3.1/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Xt_geoip/xt_geoip_en.lex
118 --- smeserver-xt_geoip-1.3.1.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Xt_geoip/xt_geoip_en.lex 2023-01-11 20:36:20.000000000 +0400
119 +++ smeserver-xt_geoip-1.3.1/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Xt_geoip/xt_geoip_en.lex 2023-01-11 22:42:22.754000000 +0400
120 @@ -63,4 +63,7 @@
121 <ul><li>Select here among the other services not yet managed individually.
122 </li><li>You may select one or more elements. Generally <b>enabled and public</b> ones.</li></ul> ',
123 'xtg_LABEL_AVAILABLE_SERVICES' => 'Available Services',
124 -'xtg_ERROR_LICENSE_KEY' => ' <font color="red">GEOIP license key unavailable. Downloading is <b>inactive</b></font> ',
125 +'xtg_ERROR_LICENSE_KEY' => 'GEOIP license key unavailable. Downloading is <b>inactive</b>',
126 +'xtg_ERROR_MISSING_MODULE' => 'Module xt_geoip is missing. GeoIP based filtering is <b>inactive</b>',
127 +'xtg_ERROR_UNLOADED_MODULE' => 'Module xt_geoip not loaded. GeoIP based filtering is <b>inactive</b>',
128 +'xtg_ERROR_FILTER_CHAIN_MISSING' => 'Filtering chain XTGeoIP is not in use. GeoIP based filtering is <b>inactive</b>',

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