fix SF defect 3530574

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13151 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2012-06-22 14:24:03 +00:00
parent c7caefc2be
commit ff4c96376c

View File

@ -1993,8 +1993,17 @@ sub validate {
next unless ($peerhost eq $rule->{host});
}
if ($rule->{commands} and $rule->{commands} ne '*') {
#TODO: syntax for multiple commands
next unless ($request->{command}->[0] eq $rule->{commands});
my @commands = split(",", $rule->{commands});
my $found =0;
foreach my $cmd (@commands) {
if ($request->{command}->[0] eq $cmd) {
$found=1;
last;
}
}
if ($found == 0) { # no command match
next ;
}
}
if ($rule->{parameters} and $rule->{parameters} ne '*') {
my $parms;