From 8fcbfe7cc82418850369b687a811a8116a06f7d8 Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 22 Jan 2009 00:34:04 +0000 Subject: [PATCH] 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 --- xCAT-server/sbin/xcat_traphandler | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/sbin/xcat_traphandler b/xCAT-server/sbin/xcat_traphandler index 65779904a..fc804f8cd 100755 --- a/xCAT-server/sbin/xcat_traphandler +++ b/xCAT-server/sbin/xcat_traphandler @@ -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;