Commit f69ff9d7 authored by Mike Hibler's avatar Mike Hibler

A couple of fixes for the case where boss is fs (i.e., ops-as-a-jail).

parent 9665fe1d
......@@ -112,6 +112,7 @@ my $TBLOGS = "@TBLOGSEMAIL@";
my $TBDOCBASE = "@TBDOCBASE@";
my $TBBASE = "@TBBASE@";
my $CONTROL = "@USERNODE@";
my $ISFS = ("@BOSSNODE_IP@" eq "@FSNODE_IP@") ? 1 : 0;
#
# Testbed Support libraries
......@@ -1026,7 +1027,7 @@ sub ParseArgs()
if (! ($tempnsfile =~ /^\/tmp\/[-\w]+-\d+\.nsfile/) &&
! ($tempnsfile =~ /^\/tmp\/\d+\.ns/) &&
! ($tempnsfile =~ /^\/var\/tmp\/php[-\w]+/) &&
! TBValidUserDir($tempnsfile, 0)) {
! TBValidUserDir($tempnsfile, $ISFS)) {
tberror({type => 'primary', severity => SEV_ERROR,
error => ['disallowed_directory', $tempnsfile]},
"$tempnsfile does not resolve to an allowed directory!");
......
......@@ -90,6 +90,7 @@ my $TBINFO = "$TB/expinfo";
my $TBDOCBASE = "@TBDOCBASE@";
my $TBBASE = "@TBBASE@";
my $CONTROL = "@USERNODE@";
my $ISFS = ("@BOSSNODE_IP@" eq "@FSNODE_IP@") ? 1 : 0;
#
# Testbed Support libraries
......@@ -304,7 +305,7 @@ if ($inout eq "modify" && @ARGV > 2) {
#
if (! ($tempnsfile =~ /^\/tmp\/[-\w]+-\d+\.nsfile/) &&
! ($tempnsfile =~ /^\/var\/tmp\/php\w+/) &&
! TBValidUserDir($tempnsfile, 0)) {
! TBValidUserDir($tempnsfile, $ISFS)) {
tbdie("$tempnsfile does not resolve to an allowed directory!");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment