Skip to content
Snippets Groups Projects
Commit 1b487ec4 authored by Jan Soukal's avatar Jan Soukal
Browse files

issue 596, pridana podpora varovani pri pouziti obsolete atributu ze strany odesilajicich klientu

parent 03080a62
No related branches found
No related tags found
No related merge requests found
2012-12-?? v.2.2-beta version
--------------------------------------------------------------------------------
- Enhanced handling of errors. Die() functions are removed from (#599)
the code, errors are handled using return values.
2012-11-05 v.2.1-beta version 2012-11-05 v.2.1-beta version
------------------------------- --------------------------------------------------------------------------------
- Added WardenClientCommon.pm package containing error-handling and - Added WardenClientCommon.pm package containing error-handling and
connect-to-server functions connect-to-server functions
- Installation of Warden client does not require copying of certificates - Installation of Warden client does not require copying of certificates
...@@ -17,13 +22,13 @@ ...@@ -17,13 +22,13 @@
2012-07-27 v.2.0 stable version and bugfix release of warden-client-2.0.0-beta 2012-07-27 v.2.0 stable version and bugfix release of warden-client-2.0.0-beta
------------------------------------------------------------------------------ --------------------------------------------------------------------------------
- Sender client code fixed, so that it will not terminate "parent" - Sender client code fixed, so that it will not terminate "parent"
application when crashed application when crashed
2012-05-10 v.2.0.0-beta beta version of warden-client-2.0.0 2012-05-10 v.2.0.0-beta beta version of warden-client-2.0.0
----------------------------------------------------------- --------------------------------------------------------------------------------
- Changed communication with server: HTTP layer added (compatible with - Changed communication with server: HTTP layer added (compatible with
Apache mod_perl version of Warden server) Apache mod_perl version of Warden server)
- Removed Linux version check in install.sh, unistall.sh and update.sh - Removed Linux version check in install.sh, unistall.sh and update.sh
...@@ -31,7 +36,7 @@ ...@@ -31,7 +36,7 @@
2012-03-30 v1.2.0 stable version and bugfix release of warden-client-1.1.0 2012-03-30 v1.2.0 stable version and bugfix release of warden-client-1.1.0
-------------------------------------------------------------------------- --------------------------------------------------------------------------------
- Fixed SSL certificate/key access privileges security issue - Fixed SSL certificate/key access privileges security issue
- Fixed client crash after multiple events download - Fixed client crash after multiple events download
- Fixed install.sh crash when warden client installation dictionary doesn't exist - Fixed install.sh crash when warden client installation dictionary doesn't exist
...@@ -41,7 +46,7 @@ ...@@ -41,7 +46,7 @@
2012-02-06 v1.1.0 stable version and bugfix release of warden-client-1.0.0 2012-02-06 v1.1.0 stable version and bugfix release of warden-client-1.0.0
-------------------------------------------------------------------------- --------------------------------------------------------------------------------
- Fixed bug when receiving of events - Fixed bug when receiving of events
- Fixed earlier declaration in same scope of variable $data - Fixed earlier declaration in same scope of variable $data
- Fixed errMsg function -> finishing by the die function - Fixed errMsg function -> finishing by the die function
...@@ -54,7 +59,7 @@ ...@@ -54,7 +59,7 @@
2011-11-16 v1.0.0 stable version 2011-11-16 v1.0.0 stable version
-------------------------------- --------------------------------------------------------------------------------
- Initial package of warden client - Initial package of warden client
- SSL certificate authentication/authorization supported - SSL certificate authentication/authorization supported
- Automatized installation process - Automatized installation process
...@@ -422,11 +422,15 @@ I. Functions, Arguments and Calls ...@@ -422,11 +422,15 @@ I. Functions, Arguments and Calls
$note = "this threat is dangerous"; $note = "this threat is dangerous";
# PRIORITY - INT 1 # PRIORITY - INT 1
# Note: Currently obsolete (although still supported). Will be removed in
# warden-client 3.0!
# Subjective definition of incident severity. Values 0-255 are # Subjective definition of incident severity. Values 0-255 are
# possible where 0 is the lowest priority or 'undef'. # possible where 0 is the lowest priority or 'undef'.
$priority = "1"; $priority = "1";
# TIMEOUT - INT 2 # TIMEOUT - INT 2
# Note: Currently obsolete (although still supported). Will be removed in
# warden-client 3.0!
# Subjective time (in minutes) or 'undef'. After this time event might be # Subjective time (in minutes) or 'undef'. After this time event might be
# considered timeouted. # considered timeouted.
$timeout = "20"; $timeout = "20";
......
...@@ -16,6 +16,29 @@ use SOAP::Transport::HTTP; ...@@ -16,6 +16,29 @@ use SOAP::Transport::HTTP;
our $VERSION = "2.2"; our $VERSION = "2.2";
#-------------------------------------------------------------------------------
# warnMsg - prints warning (to STDERR and/or Syslog) and returns 1
#-------------------------------------------------------------------------------
sub warnMsg
{
my $msg = shift;
# print warning to STDERR?
if ($WardenClientConf::LOG_STDERR) {
print STDERR $msg . "\n";
}
# print warning to Syslog?
if ($WardenClientConf::LOG_SYSLOG) {
openlog("Warden-client:", "pid", "$WardenClientConf::LOG_SYSLOG_FACILITY");
syslog("warn|$WardenClientConf::LOG_SYSLOG_FACILITY", $msg . "\n");
closelog();
}
return 1;
} # end of warnMsg()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# errMsg - print error message and returns undef # errMsg - print error message and returns undef
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
......
...@@ -10,6 +10,13 @@ package WardenClientConf; ...@@ -10,6 +10,13 @@ package WardenClientConf;
use strict; use strict;
# (for more information se issue #596) - Should be removed in Warden client 3.0
# Array containg event attributes that has already been reported to user as obsolete.
our %report_obsolete = ();
$report_obsolete{'priority'} = 1;
$report_obsolete{'timeout'} = 1;
# end of issue #596
# preset of default variables # preset of default variables
our $URI = undef; our $URI = undef;
our $SSL_KEY_FILE = undef; our $SSL_KEY_FILE = undef;
...@@ -22,7 +29,7 @@ our $LOG_SYSLOG_FACILITY = "local7"; ...@@ -22,7 +29,7 @@ our $LOG_SYSLOG_FACILITY = "local7";
our $LOG_VERBOSE = 0; our $LOG_VERBOSE = 0;
our $VERSION = "2.1"; our $VERSION = "2.2";
sub loadConf sub loadConf
{ {
......
...@@ -50,6 +50,30 @@ sub saveNewEvent ...@@ -50,6 +50,30 @@ sub saveNewEvent
my $priority = $event[9]; my $priority = $event[9];
my $timeout = $event[10]; my $timeout = $event[10];
# Issue #596 - Should be removed in Warden client 3.0.
# Checking for obsolete attributes priority or timeout. If not default or 'undef' values are found, print out warning.
# check if obsolete event attribute Priority is used
if ($WardenClientConf::report_obsolete{'priority'} && (defined $priority) && ($priority >= 1)) {
# print warning
WardenClientCommon::warnMsg('Event attribute "Priority" is now obsolete and will be removed in Warden client 3.0');
# update WardenClientConf::report_obsolete reference to avoid multiple reports regarding one event attribute
$WardenClientConf::report_obsolete{'priority'} = 0;
}
# check if obsolete event attribute Timeout is used
if ($WardenClientConf::report_obsolete{'timeout'} && (defined $timeout) && ($timeout >= 0)) {
# print warning
WardenClientCommon::warnMsg('Event attribute "Timeout" is now obsolete and will be removed in Warden client 3.0');
# update WardenClientConf::report_obsolete reference to avoid multiple reports regarding one event attribute
$WardenClientConf::report_obsolete{'timeout'} = 0;
}
# end of Issue #596
my $event; my $event;
eval { eval {
# create SOAP data object # create SOAP data object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment