From 7625dab5754a706aedb2ac7d8bac7173e9ac9406 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 21 Jun 2012 16:12:18 +0000 Subject: [PATCH] fix defect 3393889, allow longhostname in policy table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13141 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/xcatd.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/xcatd.pm b/xCAT-server/lib/perl/xCAT/xcatd.pm index 57ef73888..f1318b14e 100644 --- a/xCAT-server/lib/perl/xCAT/xcatd.pm +++ b/xCAT-server/lib/perl/xCAT/xcatd.pm @@ -38,7 +38,7 @@ This program module file, is a set of utilities used by xCAT daemon. Error: none Example: - if(xCAT::XCATd->validate($peername,$peerhost,$req)) { + if(xCAT::XCATd->validate($peername,$peerhost,$req,$peerhostorg,\@deferredmsgargs)) { . . Comments: @@ -54,6 +54,7 @@ sub validate { my $peername=shift; my $peerhost=shift; my $request=shift; + my $peerhostorg=shift; my $deferredmsgargs=shift; # now check the policy table if user can run the command @@ -70,7 +71,7 @@ sub validate { # check to see if peerhost is trusted foreach $rule (@$policies) { - if (($rule->{name} and ($rule->{name} eq $peerhost)) && ($rule->{rule}=~ /trusted/i)) { + if (($rule->{name} and (($rule->{name} eq $peerhost) || ($rule->{name} eq $peerhostorg))) && ($rule->{rule}=~ /trusted/i)) { $peerstatus="Trusted"; last; }