Commit 571979f4 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add a check for setuid perl and stop early.

parent fd4a999c
......@@ -357,6 +357,13 @@ if ($UID != 0) {
die "This script must be run as root.\n";
}
Phase "sperl", "Checking for setuid perl", sub {
if (ExecQuiet("$PKG_INFO -L -x perl-5 | fgrep -q -s sperl") == 0) {
PhaseSkip("Perl is okay");
}
PhaseFail("setuid perl is not set up properly. Read the wiki!");
};
Phase "usersgroups", "Creating users and groups", sub {
Phase "tbadmin", "Creating tbadmin group", sub {
if (getgrnam("tbadmin")) {
......
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-2008 University of Utah and the Flux Group.
# Copyright (c) 2003-2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -228,6 +228,12 @@ if ($UID != 0) {
#
# The phases are fairly self-explanatory
#
Phase "sperl", "Checking for setuid perl", sub {
if (ExecQuiet("$PKG_INFO -L -x perl-5 | fgrep -q -s sperl") == 0) {
PhaseSkip("Perl is okay");
}
PhaseFail("setuid perl is not set up properly. Read the wiki!");
};
Phase "dirs", "Setting directory permissions", sub {
foreach my $dirref (@TESTBED_DIRS) {
......
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-2008 University of Utah and the Flux Group.
# Copyright (c) 2003-2010 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -291,6 +291,13 @@ if ($UID != 0) {
#
# The phases are fairly self-explanatory
#
Phase "sperl", "Checking for setuid perl", sub {
if (ExecQuiet("$PKG_INFO -L -x perl-5 | fgrep -q -s sperl") == 0) {
PhaseSkip("Perl is okay");
}
PhaseFail("setuid perl is not set up properly. Read the wiki!");
};
Phase "usersgroups", "Creating users and groups", sub {
Phase "tbadmin", "Creating tbadmin group", sub {
if (getgrnam("tbadmin")) {
......
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