Commit 83783d18 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Check for proper version before executing so that we don't run

this out of development trees.
parent f695f6a2
......@@ -23,6 +23,17 @@ my $lockfile = "/var/tmp/testbed_named_lockfile";
my $dbg = 0;
my @row;
#
# We don't want to run this script unless its the real version.
#
if ($EUID != 0) {
die("Must be root! Maybe its a development version?");
}
# XXX Hacky!
if ($TB ne "/usr/testbed") {
die("Wrong version. Maybe its a development version?");
}
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin:/usr/local/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
......
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