/[smecontribs]/rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz11650.patch
ViewVC logotype

Annotation of /rpms/smeserver-fail2ban/contribs10/smeserver-fail2ban-0.1.18-bz11650.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Dec 9 00:53:35 2021 UTC (2 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-fail2ban-0_1_18-27_el7_sme, smeserver-fail2ban-0_1_18-31_el7_sme, smeserver-fail2ban-0_1_18-24_el7_sme, smeserver-fail2ban-0_1_18-30_el7_sme, smeserver-fail2ban-0_1_18-25_el7_sme, smeserver-fail2ban-0_1_18-22_el7_sme, smeserver-fail2ban-0_1_18-32_el7_sme, smeserver-fail2ban-0_1_18-20_el7_sme, smeserver-fail2ban-0_1_18-28_el7_sme, smeserver-fail2ban-0_1_18-29_el7_sme, smeserver-fail2ban-0_1_18-21_el7_sme, smeserver-fail2ban-0_1_18-23_el7_sme, smeserver-fail2ban-0_1_18-26_el7_sme, HEAD
* Wed Dec 08 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.18-20.sme
- allow baning subnet [SME: 11650]

1 jpp 1.1 diff -Nur --no-dereference smeserver-fail2ban-0.1.18.old/root/sbin/e-smith/smeserver-fail2ban smeserver-fail2ban-0.1.18/root/sbin/e-smith/smeserver-fail2ban
2     --- smeserver-fail2ban-0.1.18.old/root/sbin/e-smith/smeserver-fail2ban 2017-10-27 08:34:58.000000000 -0400
3     +++ smeserver-fail2ban-0.1.18/root/sbin/e-smith/smeserver-fail2ban 2021-12-08 19:47:48.067000000 -0500
4     @@ -15,7 +15,7 @@
5    
6     Usage: $0 --host=<ip> [--unban] [--protocol=tcp|udp|icmp|all] [--port=<port number>] [--bantime]
7    
8     - * --host must specify a valid IPv4 adress in the form 10.11.12.13
9     + * --host must specify a valid IPv4 adress in the form 10.11.12.13 or an IPv4 subnet in the form 10.11.12.0/24
10     * --protocol can be used to specify the protocol to block. Only tcp, udp, icmp and all are valid (default is all)
11     * --port can be used to specify the port(s) to block. Only valid for tcp and udp. You can also specify a range
12     of port like 10000:20000. You can also specify several ports or range of port separated by a comma
13     @@ -91,9 +91,9 @@
14     usage() && die unless (defined $opts{$_});
15     }
16    
17     -# host must look like an IP address
18     +# host must look like an IP address or IP with subnet
19     usage() && die
20     - unless ($opts{host} =~ m/^(?:(?:[01]?\d?\d?|2[0-4]\d|25[0-5])(?:\.|$)){4}$/);
21     + unless ($opts{host} =~ m'^([01]?\d\d?|2[0-4]\d|25[0-5])(?:\.[01]?\d\d?|\.2[0-4]\d|\.25[0-5]){3}(?:/[0-2]\d|/3[0-2])?$');
22    
23     # protocol must can only be undefined, tcp, udp or icmp
24     usage() && die

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