fix check for Trusted status

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5462 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-03-12 20:25:07 +00:00
parent eb005c6d2a
commit ec4a054d0e

View File

@ -1577,12 +1577,16 @@ sub validate {
my $policies = $policytable->getAllEntries;
$policytable->close;
my $rule;
my $peerstatus;
RULE: foreach $rule (@$policies) {
# check to see if peerhost is trusted
my $peerstatus="untrusted";
# check to see if peerhost is trusted
foreach $rule (@$policies) {
if (($rule->{name} eq $peerhost) && ($rule->{rule}=~ /trusted/i)) {
$peerstatus="Trusted";
last;
}
}
RULE: foreach $rule (@$policies) {
if ($rule->{name} and $rule->{name} ne '*') {
#TODO: more complex matching (lists, wildcards)
next unless ($peername and $peername eq $rule->{name});