fixed a security risk by resetting XCATCFG in snmp trap handler
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2638 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3c894101f4
commit
8fcbfe7cc8
@ -257,10 +257,12 @@ if ($EMAIL || ((keys(%hashE)==0) && ($severity_type =~/Critical|Warning/))) {
|
||||
|
||||
#email the full message to the alerts aliase
|
||||
my $cmd="echo \'$info$head\n$middle\' \| mail -s \"$severity_type: Cluster SNMP Alert\!\" $MAILTO";
|
||||
$ENV{'XCATCFG'}="";
|
||||
`$cmd`;
|
||||
}
|
||||
|
||||
#log to syslog if needed. default is log all
|
||||
$ENV{'XCATCFG'}="";
|
||||
if ($LOG || (keys(%hashL)==0)) {
|
||||
my $head="SNMP $severity received from $host($ip).";
|
||||
my $body;
|
||||
|
Loading…
Reference in New Issue
Block a user