/[smecontribs]/rpms/smeserver-fail2ban/contribs9/smeserver-fail2ban-0.1.18.bz10767-adminpanel.patch
ViewVC logotype

Diff of /rpms/smeserver-fail2ban/contribs9/smeserver-fail2ban-0.1.18.bz10767-adminpanel.patch

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

Revision 1.1 by jpp, Wed Apr 10 02:46:35 2019 UTC Revision 1.3 by jpp, Wed Apr 10 03:40:59 2019 UTC
# Line 342  diff -Nur smeserver-fail2ban-0.1.18.old/ Line 342  diff -Nur smeserver-fail2ban-0.1.18.old/
342  diff -Nur smeserver-fail2ban-0.1.18.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm smeserver-fail2ban-0.1.18/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm  diff -Nur smeserver-fail2ban-0.1.18.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm smeserver-fail2ban-0.1.18/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm
343  --- smeserver-fail2ban-0.1.18.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm  1969-12-31 19:00:00.000000000 -0500  --- smeserver-fail2ban-0.1.18.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm  1969-12-31 19:00:00.000000000 -0500
344  +++ smeserver-fail2ban-0.1.18/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm      2019-04-09 22:35:27.295000000 -0400  +++ smeserver-fail2ban-0.1.18/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/fail2ban.pm      2019-04-09 22:35:27.295000000 -0400
345  @@ -0,0 +1,419 @@  @@ -0,0 +1,428 @@
346  +#!/usr/bin/perl -w  +#!/usr/bin/perl -w
347  +  +
348  +package    esmith::FormMagick::Panel::fail2ban;  +package    esmith::FormMagick::Panel::fail2ban;
# Line 361  diff -Nur smeserver-fail2ban-0.1.18.old/ Line 361  diff -Nur smeserver-fail2ban-0.1.18.old/
361  +  +
362  +our @EXPORT = qw(get_value get_prop change_settings RemoveIP);  +our @EXPORT = qw(get_value get_prop change_settings RemoveIP);
363  +  +
364  +our $VERSION = sprintf '%d.%03d', q$Revision: 1.00 $ =~ /: (\d+).(\d+)/;  +our $VERSION = sprintf '%d.%03d', q$Revision: 1.2 $ =~ /: (\d+).(\d+)/;
365  +our $db = esmith::ConfigDB->open  +our $db = esmith::ConfigDB->open
366  +    || warn "Couldn't open configuration database (permissions problems?)";  +    || warn "Couldn't open configuration database (permissions problems?)";
367  +my $scriptname = basename($0);  +my $scriptname = basename($0);
# Line 678  diff -Nur smeserver-fail2ban-0.1.18.old/ Line 678  diff -Nur smeserver-fail2ban-0.1.18.old/
678  +    # for the 9 services update unless key does not exist and property does not exist and value eq default  +    # for the 9 services update unless key does not exist and property does not exist and value eq default
679  +       foreach my $key (keys %services)  +       foreach my $key (keys %services)
680  +    {  +    {
681  +       $rec = $db->get($key);  +        if ($key eq "wordpress")
682  +       my $getprop = $db->get_prop($key,'Fail2Ban') || "";  +        {
683  +       $rec->set_prop('Fail2Ban', $services{$key}  ) unless ( ! $rec || (! $db->get_prop($key,'Fail2Ban') && $services{$key} eq $defaultval{$key} )  );    +                $rec = $db->get('fail2ban');
684    +                my $getprop = $db->get_prop('fail2ban',$key) || "";
685    +                $rec->set_prop($key, $services{$key}  ) unless ( ! $rec || (! $db->get_prop('fail2ban', $key) && $services{$key} eq $defaultval{$key} )  );
686    +        }
687    +        else
688    +        {
689    +                $rec = $db->get($key);
690    +                my $getprop = $db->get_prop($key,'Fail2Ban') || "";
691    +                $rec->set_prop('Fail2Ban', $services{$key}  ) unless ( ! $rec || (! $db->get_prop($key,'Fail2Ban') && $services{$key} eq $defaultval{$key} )  );
692    +        }
693  +    }  +    }
694  +# this seems to prevent reload of service if we update something and remove or add an ip...  +# this seems to prevent reload of service if we update something and remove or add an ip...
695  +#    return '' unless $fm->add_new_valid_from;  +#    return '' unless $fm->add_new_valid_from;
# Line 772  diff -Nur smeserver-fail2ban-0.1.18.old/ Line 781  diff -Nur smeserver-fail2ban-0.1.18.old/
781  +fail2ban-client status $SERVI |grep -E 'IP list|Status for the jail' |sed 'N;s/\n/:/'|cut -d: -f2,4  +fail2ban-client status $SERVI |grep -E 'IP list|Status for the jail' |sed 'N;s/\n/:/'|cut -d: -f2,4
782  +done  +done
783  +  +
784    diff -Nur smeserver-fail2ban-0.1.18.old/createlinks smeserver-fail2ban-0.1.18/createlinks
785    --- smeserver-fail2ban-0.1.18.old/createlinks   2017-10-27 08:34:58.000000000 -0400
786    +++ smeserver-fail2ban-0.1.18/createlinks       2019-04-09 23:39:11.772000000 -0400
787    @@ -2,6 +2,8 @@
788    
789     use esmith::Build::CreateLinks qw(:all);
790    
791    +panel_link("fail2ban", "manager");
792    +
793     templates2events("/etc/rc.d/init.d/masq", "fail2ban-update");
794    
795     foreach my $event qw(fail2ban-conf bootstrap-console-save){


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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