From 4a7fc9f6349f56d8f0409a1cbb3df693944a2810 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Mon, 27 Oct 2014 21:06:58 +0100 Subject: [PATCH] guardian.cgi: Add dropdown for PriorityLevel selection. Signed-off-by: Stefan Schantl --- html/cgi-bin/guardian.cgi | 17 ++++++++++++++++- langs/en/cgi-bin/en.pl | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/guardian.cgi b/html/cgi-bin/guardian.cgi index e65f4c7d05..ebf9c3bb5d 100644 --- a/html/cgi-bin/guardian.cgi +++ b/html/cgi-bin/guardian.cgi @@ -62,6 +62,7 @@ $settings{'GUARDIAN_BLOCKCOUNT'} = '3'; $settings{'GUARDIAN_BLOCKTIME'} = '86400'; $settings{'GUARDIAN_LOGFILE'} = '/var/log/guardian/guardian.log'; $settings{'GUARDIAN_SNORT_ALERTFILE'} = '/var/log/snort/alert'; +$settings{'GUARDIAN_PRIORITY_LEVEL'} = '3'; $settings{'ACTION'} = ''; @@ -259,7 +260,8 @@ sub showMainBox() { $checked{'GUARDIAN_ENABLE_HTTPD'}{'on'} = ''; $checked{'GUARDIAN_ENABLE_HTTPD'}{$settings{'GUARDIAN_ENABLE_HTTPD'}} = "checked='checked'"; - $selected{'GUARDIAN_LOGLEVEL'}{$settings{'GUARDIAN_LOGLEVEL'}}= 'selected'; + $selected{'GUARDIAN_LOGLEVEL'}{$settings{'GUARDIAN_LOGLEVEL'}} = 'selected'; + $selected{'GUARDIAN_PRIORITY_LEVEL'}{$settings{'GUARDIAN_PRIORITY_LEVEL'}} = 'selected'; &Header::openpage($Lang::tr{'guardian configuration'}, 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); @@ -365,6 +367,18 @@ END
+ + $Lang::tr{'guardian priority level'}: + + + +
+ $Lang::tr{'guardian blockcount'}: @@ -634,6 +648,7 @@ sub BuildConfiguration() { print FILE "AlertFile $settings{'GUARDIAN_SNORT_ALERTFILE'}\n"; print FILE "IgnoreFile $ignorefile\n"; print FILE "TimeLimit $settings{'GUARDIAN_BLOCKTIME'}\n"; + print FILE "PriorityLevel $settings{'GUARDIAN_PRIORITY_LEVEL'}\n"; close(FILE); diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index a72f5bfddc..cbdc4749b8 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1260,6 +1260,7 @@ 'guardian logfile' => 'Logfile', 'guardian no entries' => 'No entries at the moment.', 'guardian not running no hosts can be blocked' => 'Guardian is not running. No hosts will be blocked.', +'guardian priority level' => 'Prioritylevel', 'guardian service' => 'Guardian Service', 'guardian snort alertfile' => 'Alertfile from Snort', 'guest ok' => 'allow guests to access', -- 2.39.5