From fba4a7b612b8837ff4444bb78e86407ff8c2fdd7 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 5 Feb 2010 12:57:23 +0000 Subject: [PATCH] add update of policy table with MN name for AIX and Linux, based on name in generated certificate git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5163 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 07ee339c8..c2a0259c4 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1038,6 +1038,8 @@ sub initDB { $chtabcmds = "$::XCATROOT/sbin/chtab priority=1 policy.name=root policy.rule=allow;"; + $chtabcmds .= + "$::XCATROOT/sbin/chtab priority=1.2 policy.name=$hname policy.rule=allow;"; $chtabcmds .= "$::XCATROOT/sbin/chtab priority=2 policy.commands=getbmcconfig policy.rule=allow;"; $chtabcmds .= @@ -1240,6 +1242,13 @@ sub genCredentials else { xCAT::MsgUtils->message('I', "Created xCAT certificate."); + my $chtabcmds = + "$::XCATROOT/sbin/chtab priority=1.2 policy.name=$hname policy.rule=allow;"; + my $outref = xCAT::Utils->runcmd("$chtabcmds", 0); + if ($::RUNCMD_RC != 0) + { + xCAT::MsgUtils->message('E', "Could not create policy definition.$chtabcmds."); + } } }