From 9c1ce3d91c1186f741a7d1a5f25c15b600d29dc7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 6 Sep 2008 22:36:02 +0000 Subject: [PATCH] -Have bmcsetup use the credential allowance scheme to reinforce security authentication to more definitive host-based git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2087 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/allowcred.awk | 15 +++++++++++++++ xCAT-nbroot/overlay/bin/bmcsetup | 3 +++ 2 files changed, 18 insertions(+) create mode 100755 xCAT-nbroot/overlay/bin/allowcred.awk diff --git a/xCAT-nbroot/overlay/bin/allowcred.awk b/xCAT-nbroot/overlay/bin/allowcred.awk new file mode 100755 index 000000000..341138d3e --- /dev/null +++ b/xCAT-nbroot/overlay/bin/allowcred.awk @@ -0,0 +1,15 @@ +#!/usr/bin/awk -f +BEGIN { + listener = "/inet/tcp/300/0/0" + quit = "no" + + + while (match(quit,"no")) { + while ((listener |& getline) > 0) { + if (match($0,"CREDOKBYYOU?")) { + print "CREDOKBYME" |& listener + } + } + close(listener) + } +} diff --git a/xCAT-nbroot/overlay/bin/bmcsetup b/xCAT-nbroot/overlay/bin/bmcsetup index 0d12ee466..f08e92498 100755 --- a/xCAT-nbroot/overlay/bin/bmcsetup +++ b/xCAT-nbroot/overlay/bin/bmcsetup @@ -1,10 +1,13 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +allowcred.awk & +CREDPID=$! modprobe ipmi_si modprobe ipmi_devintf while ! getipmi do echo "Retrying retrieval of IPMI settings from server" done +kill $CREDPID BMCIP=`grep bmcip /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` BMCGW=`grep gateway /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` BMCNM=`grep netmask /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'`