From 8b5a9c955f28aeb83fa95c17df5b1fb20edda33f Mon Sep 17 00:00:00 2001 From: nott Date: Mon, 31 Jan 2011 20:28:49 +0000 Subject: [PATCH] check for absolute path in litefile git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/InstUtils.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index a96e53633..5ba19bd1e 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -121,7 +121,7 @@ sub myxCATname my ($junk, $name); # make sure xcatd is running - & db is available - # this routine is also called during initial install of xCAT + # this routine is called during initial install of xCAT my $rc = `lsxcatd -d`; if ($rc == 0) { @@ -1067,6 +1067,14 @@ sub dolitesetup # ex. /foo/bar/ or /etc/lppcfg my ($node, $option, $file) = split (/\|/, $line); + # entry must be an absolute path + unless ($file =~ m{^/}) { + my $rsp; + push @{$rsp->{data}}, "The litefile entry \'$file\' is not an absolute path name.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 1; + } + # ex. /foo or /etc my $filedir = dirname($file);