Commit ee6f157c authored by Leigh Stoller's avatar Leigh Stoller

A zillion configure/makefile changes, described in gory detail to

the testbed list.
parent 59113e70
#
# Testbed Makefile
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
SRCDIR = @srcdir@
OBJDIR = .
SUBDIR =
TESTBED_SRCDIR = @top_srcdir@
DISTCLEAN_FILES = @DISTCLEAN_FILES@
include Makeconf
......@@ -10,13 +13,14 @@ SUBDIRS = lib assign discvr tbsetup db os security pxe tmcd www tip capture
all: all-subdirs
install: install-subdirs
echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
@echo "DON'T FORGET TO RUN A POST-INSTALL AS ROOT"
post-install:
@$(MAKE) -C tbsetup post-install
@$(MAKE) -C security post-install
clean: clean-subdirs
distclean: distclean-subdirs
rm -f Makeconf GNUmakefile config.status config.cache config.log
rm -f $(DISTCLEAN_FILES)
# How to recursively descend into subdirectories to make general
# targets such as `all'.
......
#
# Insert Copyright Here.
#
# Get rid of a bunch of nasty built-in implicit rules,
# to avoid bogus circular dependencies and make things go faster.
# Use the `-r' command line option to make to get even better performance.
.SUFFIXES:
#
# Various install targets.
#
$(INSTALL_BINDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_BINDIR)
......@@ -11,14 +20,14 @@ $(INSTALL_SBINDIR)/%: %
-mkdir -p $(INSTALL_SBINDIR)
$(INSTALL_PROGRAM) $< $@
$(INSTALL_BINDIR)/%: %.tcl
$(INSTALL_LIBDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_BINDIR)
-mkdir -p $(INSTALL_LIBDIR)
$(INSTALL_PROGRAM) $< $@
$(INSTALL_LIBDIR)/%: %
$(INSTALL_LIBEXECDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_LIBDIR)
-mkdir -p $(INSTALL_LIBEXECDIR)
$(INSTALL_PROGRAM) $< $@
$(INSTALL_ETCDIR)/%: %
......@@ -33,9 +42,29 @@ $(INSTALL_WWWDIR)/%: %
CFLAGS += $(LOCALCFLAGS)
vpath %.c $(SRCDIR)
clean:
distclean: clean
rm -f GNUmakefile $(DISTCLEAN_FILES)
rm -f GNUmakefile
#
# Where to find source files.
# Using specific patterns instead of the catch-all VPATH variable
# avoids hitting miscellaneous wrong targets in other directories
# when configuring in the source directory.
#
vpath %.in $(SRCDIR)
vpath %.c $(SRCDIR)
#
# Define rules which we blew away with .SUFFIXES
#
%.o: %.c
$(CC) -c -o $@ $(CFLAGS) $<
#
# Rules to regen configure written files.
#
%: %.in
@echo "Regenerating $@"
cd $(OBJDIR) && CONFIG_FILES=$(SUBDIR)/$@ config.status
\ No newline at end of file
......@@ -13,6 +13,7 @@ export RANLIB = @RANLIB@
prefix = @prefix@
exec_prefix = @exec_prefix@
TBROOT = @prefix@
TBDBNAME = @TBDBNAME@
CPPFLAGS = @CPPFLAGS@
CFLAGS += @CFLAGS@
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = assign
include $(OBJDIR)/Makeconf
all: assign
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
LEDA=@LEDA@
......@@ -27,7 +32,7 @@ assign_p: assign.po $(DEPLIBS) $(POBJS)
assign.po: assign.cc
${CXX} -c -pg -g -o assign.po assign.cc ${CXXFLAGS}
install: $(INSTALL_BINDIR)/assign $(INSTALL_LIBDIR)/assign
install: $(INSTALL_LIBEXECDIR)/assign
clean:
/bin/rm -f *.o assign
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = capture
include $(OBJDIR)/Makeconf
all: capture
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
DESTDIR=
......
......@@ -11,8 +11,11 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr/testbed
ac_help="$ac_help
--with-TBDBNAME=name Specify TBDB name (tbdb default)"
ac_help="$ac_help
--with-WWWDEFS=name Specify WWW defintions ("default" default)"
ac_help="$ac_help
--with-LEDA Specify LEDA path (/usr/testbed default)"
ac_help="$ac_help
......@@ -549,13 +552,14 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:559: checking host system type" >&5
echo "configure:563: checking host system type" >&5
host_alias=$host
case "$host_alias" in
......@@ -576,7 +580,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:580: checking build system type" >&5
echo "configure:584: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -602,7 +606,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:606: checking for $ac_word" >&5
echo "configure:610: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -634,7 +638,7 @@ fi
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
set dummy ${ac_tool_prefix}g++; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:638: checking for $ac_word" >&5
echo "configure:642: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -666,7 +670,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:670: checking for $ac_word" >&5
echo "configure:674: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -698,7 +702,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:702: checking for $ac_word" >&5
echo "configure:706: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -730,7 +734,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:734: checking for $ac_word" >&5
echo "configure:738: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -760,11 +764,6 @@ fi
#
# overide with --prefix.
#
ac_default_prefix=/usr/testbed
#
# Okay, I know this is improper usage of --with. Too bad.
#
......@@ -785,6 +784,26 @@ fi
#
# Okay, I know this is improper usage of --with. Too bad.
#
# Check whether --with-WWWDEFS or --without-WWWDEFS was given.
if test "${with_WWWDEFS+set}" = set; then
withval="$with_WWWDEFS"
if test "$withval" = "yes"; then
{ echo "configure: error: Invalid WWWDEFS - Must specify the value" 1>&2; exit 1; }
fi
WWWDEFS="$withval"
else
WWWDEFS="default"
fi
# Check whether --with-LEDA or --without-LEDA was given.
if test "${with_LEDA+set}" = set; then
withval="$with_LEDA"
......@@ -840,7 +859,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:844: checking for a BSD compatible install" >&5
echo "configure:863: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -902,17 +921,31 @@ esac
outfiles="$outfiles Makeconf GNUmakefile \
assign/GNUmakefile \
capture/GNUmakefile \
db/GNUmakefile \
db/GNUmakefile db/nalloc db/nfree \
discvr/GNUmakefile \
lib/GNUmakefile \
os/GNUmakefile os/imagezip/GNUmakefile \
pxe/GNUmakefile pxe/proxydhcp.restart pxe/bootinfo.restart \
security/GNUmakefile \
tbsetup/GNUmakefile tbsetup/ir/GNUmakefile tbsetup/ns2ir/GNUmakefile \
security/GNUmakefile security/paperbag \
tbsetup/GNUmakefile tbsetup/console_setup tbsetup/mkacct-ctrl \
tbsetup/os_load tbsetup/os_setup tbsetup/mkprojdir tbsetup/power \
tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmprojdir \
tbsetup/sched_reload tbsetup/tbdoit tbsetup/tbstopit \
tbsetup/ir/GNUmakefile tbsetup/ir/postassign tbsetup/snmpit \
tbsetup/ir/assign_wrapper tbsetup/ns2ir/GNUmakefile \
tbsetup/ns2ir/postparse tbsetup/ir/handle_os tbsetup/ir/handle_ip \
tbsetup/ns2ir/parse.tcl \
tbsetup/checkpass/GNUmakefile \
tip/GNUmakefile \
tmcd/GNUmakefile tmcd/tmcd.restart \
www/GNUmakefile"
www/GNUmakefile www/defs.php3 www/dbdefs.php3"
#
# Do this for easy distclean.
#
DISTCLEAN_FILES="$outfiles"
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
......@@ -1074,11 +1107,13 @@ s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@TBDBNAME@%$TBDBNAME%g
s%@WWWDEFS@%$WWWDEFS%g
s%@LEDA@%$LEDA%g
s%@OPT_CFLAGS@%$OPT_CFLAGS%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@DISTCLEAN_FILES@%$DISTCLEAN_FILES%g
CEOF
EOF
......@@ -1190,4 +1225,4 @@ EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
......@@ -3,6 +3,7 @@ AC_PREREQ(2.13)
AC_INIT(Makeconf.in)
AC_CONFIG_AUX_DIR(${srcdir}/autoconf)
AC_PREFIX_DEFAULT(/usr/testbed)
AC_CHECK_TOOL(CC,gcc)
AC_CHECK_TOOL(CXX,g++)
......@@ -10,11 +11,6 @@ AC_CHECK_TOOL(AR,ar)
AC_CHECK_TOOL(RANLIB,ranlib)
AC_CHECK_TOOL(STRIP,strip)
#
# overide with --prefix.
#
ac_default_prefix=/usr/testbed
#
# Okay, I know this is improper usage of --with. Too bad.
#
......@@ -30,6 +26,21 @@ AC_ARG_WITH(TBDBNAME,
])
AC_SUBST(TBDBNAME)
#
# Okay, I know this is improper usage of --with. Too bad.
#
AC_ARG_WITH(WWWDEFS,
[ --with-WWWDEFS=name Specify WWW defintions ("default" default)],
[
if test "$withval" = "yes"; then
AC_MSG_ERROR(Invalid WWWDEFS - Must specify the value)
fi
WWWDEFS="$withval"
],[
WWWDEFS="default"
])
AC_SUBST(WWWDEFS)
AC_ARG_WITH(LEDA,
[ --with-LEDA Specify LEDA path (/usr/testbed default)],
[
......@@ -76,15 +87,29 @@ esac]
outfiles="$outfiles Makeconf GNUmakefile \
assign/GNUmakefile \
capture/GNUmakefile \
db/GNUmakefile \
db/GNUmakefile db/nalloc db/nfree \
discvr/GNUmakefile \
lib/GNUmakefile \
os/GNUmakefile os/imagezip/GNUmakefile \
pxe/GNUmakefile pxe/proxydhcp.restart pxe/bootinfo.restart \
security/GNUmakefile \
tbsetup/GNUmakefile tbsetup/ir/GNUmakefile tbsetup/ns2ir/GNUmakefile \
security/GNUmakefile security/paperbag \
tbsetup/GNUmakefile tbsetup/console_setup tbsetup/mkacct-ctrl \
tbsetup/os_load tbsetup/os_setup tbsetup/mkprojdir tbsetup/power \
tbsetup/resetvlans tbsetup/rmacct-ctrl tbsetup/rmprojdir \
tbsetup/sched_reload tbsetup/tbdoit tbsetup/tbstopit \
tbsetup/ir/GNUmakefile tbsetup/ir/postassign tbsetup/snmpit \
tbsetup/ir/assign_wrapper tbsetup/ns2ir/GNUmakefile \
tbsetup/ns2ir/postparse tbsetup/ir/handle_os tbsetup/ir/handle_ip \
tbsetup/ns2ir/parse.tcl \
tbsetup/checkpass/GNUmakefile \
tip/GNUmakefile \
tmcd/GNUmakefile tmcd/tmcd.restart \
www/GNUmakefile"
AC_OUTPUT($outfiles)
www/GNUmakefile www/defs.php3 www/dbdefs.php3"
#
# Do this for easy distclean.
#
DISTCLEAN_FILES="$outfiles"
AC_SUBST(DISTCLEAN_FILES)
AC_OUTPUT($outfiles)
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = db
all:
include $(OBJDIR)/Makeconf
include ../GNUmakerules
BIN_SCRIPTS = mac2if nalloc nfree nodeip
SBIN_SCRIPTS = avail inuse showgraph
LIBEXEC_SCRIPTS = ptopgen
BINSCRIPTS = avail inuse mac2if nalloc nfree nodeip ptopgen \
showgraph
ALLSCRIPTS = checkowner.tcl \
$(BINSCRIPTS)
#
# Currently, all the stuff that gets installed in the bin directory
# gets duplicated in lib/tbsetup.
#
INSTALL_LIBTBDIR = $(INSTALL_LIBDIR)/db
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(LIBEXEC_SCRIPTS)
install: $(addprefix $(INSTALL_BINDIR)/, $(BINSCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(ALLSCRIPTS))
include $(TESTBED_SRCDIR)/GNUmakerules
#
# Leave these rules here. They should be flushed when we no longer
# dup this stuff.
#
$(INSTALL_LIBTBDIR)/%: %
@echo "Installing $<"
-mkdir -p $(INSTALL_LIBTBDIR)
$(INSTALL) $< $@
install: $(addprefix $(INSTALL_BINDIR)/, $(BIN_SCRIPTS)) \
$(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
$(addprefix $(INSTALL_LIBEXECDIR)/, $(LIBEXEC_SCRIPTS))
clean:
......@@ -2,11 +2,16 @@
use Mysql;
use English;
my $dbh = Mysql->connect("localhost","tbdb","script","none");
#
# Configure variables
#
my $TB = "@prefix@/bin";
my $DBNAME = "@TBDBNAME@";
my $dbh = Mysql->connect("localhost",$DBNAME,"script","none");
if ($#ARGV < 1) {die("Usage: nalloc <pid> <eid> <node> <node> <...>\n");}
my $TB="/usr/testbed/bin";
my $consetup="$TB/console_setup";
my $error = 0;
my $pid = shift;
......
#!/usr/local/bin/perl -w
use Mysql;
my $dbh = Mysql->connect("localhost","tbdb","script","none");
#
# Configure variables
#
my $TB = "@prefix@/bin";
my $DBNAME = "@TBDBNAME@";
my $dbh = Mysql->connect("localhost",$DBNAME,"script","none");
if ($#ARGV < 1) {
die("Usage: nfree <pid> <eid> [<node> <node> <...>]\n".
......@@ -10,7 +16,6 @@ if ($#ARGV < 1) {
}
my $error = 0;
my $TB="/usr/testbed/bin";
my $consetup="$TB/console_setup";
my $osload="$TB/os_load";
my $reloadpid="testbed";
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = discvr
include $(OBJDIR)/Makeconf
all: cli serv
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
OBJS=get_ifi_info.o get_rtaddrs.o net_rt_iflist.o sock_ntop.o util.o
SOBJS=serv_listen.o recvfromflags.o if_indextoname.o reply.o serv.o forw_requests.o
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = lib
include $(OBJDIR)/Makeconf
all: sql.so
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
sql.so:
./mk_sqlso.sh
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = os
include $(OBJDIR)/Makeconf
SUBDIRS = imagezip
all: $(SUBDIRS)
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
imagezip:
@$(MAKE) -C imagezip all
......
include ../../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = os/imagezip
include $(OBJDIR)/Makeconf
all: imagezip imageunzip
include ../../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS = -O2 -g
LIBS = -lz
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = pxe
all: proxydhcp bootinfo
include $(OBJDIR)/Makeconf
DISTCLEAN_FILES = proxydhcp.restart bootinfo.restart
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: proxydhcp bootinfo proxydhcp.restart bootinfo.restart
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
DBFLAG = -DUSE_MYSQL_DB
#DBFLAG = -DUSE_CFILE_DB
......
#
# Insert Copyright Here.
#
include ../Makeconf
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ..
SUBDIR = security
include $(OBJDIR)/Makeconf
BINS = suexec
SCRIPTS = paperbag plasticwrap
all: $(BINS)
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: $(BINS) $(SCRIPTS)
include ../GNUmakerules
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS = -O -g
CFLAGS = -O -g \
-DLOG_EXEC='"$(prefix)/log/suexec.log"' \
-DDOC_ROOT='"$(prefix)/libexec/"' \
-DSAFE_PATH='"$(prefix)/libexec:/usr/local/bin:/usr/bin:/bin"'
suexec: suexec.c suexec.h
$(CC) $(CFLAGS) -o suexec suexec.c
install: $(addprefix $(INSTALL_BINDIR)/, $(BINS))
install: $(addprefix $(INSTALL_LIBEXECDIR)/, $(BINS))
@echo "Don't forget to do a post-install as root"
post-install:
chown root $(INSTALL_BINDIR)/suexec
chmod u+s $(INSTALL_BINDIR)/suexec
chown root $(INSTALL_LIBEXECDIR)/suexec
chmod u+s $(INSTALL_LIBEXECDIR)/suexec
clean:
rm -f *.o $(BINS) core
......@@ -11,43 +11,31 @@
# Check to make sure only files/directories under user's $HOME can be
# passed as arguments, CD'ed to, etc
#
# Configure variables
#
my $TB = "@prefix@";
# List of allowed commands - Mapping is from command entered by the user
# to the actual binary to run
$tb = "/usr/testbed/bin";
%allowed = ( "avail" => "$tb/avail",
"delay_setup" => "$tb/delay_setup",
"ifc_filegen" => "$tb/ifc_filegen",
"ifc_setup" => "$tb/ifc_setup",
"inuse" => "$tb/inuse",
"ir2ifc" => "$tb/ir2ifc",
"mac2if" => "$tb/mac2if",
"mkacct" => "$tb/mkacct",
"nalloc" => "$tb/nalloc",
"nfree" => "$tb/nfree",
"nodeip" => "$tb/nodeip",
"ns" => "$tb/ns",
"oslib.tcl" => "$tb/oslib.tcl",
"power" => "$tb/power",
"ptopgen" => "$tb/ptopgen",
"resetvlans" => "$tb/resetvlans",
"rmacct" => "$tb/rmacct",
"savevlans" => "$tb/savevlans",
"showgraph" => "$tb/showgraph",
"snmpit" => "$tb/snmpit",
"tbdoit" => "$tb/tbdoit",
"tbend" => "$tb/tbend",
"tblog" => "$tb/tblog",
"tbprerun" => "$tb/tbprerun",
"tbreport" => "$tb/tbreport",
"tbrun" => "$tb/tbrun",
"tbstopit" => "$tb/tbstopit",
"trafgen" => "$tb/trafgen",
"turn" => "$tb/turn",
"vpower" => "$tb/vpower",
"vsnmpit" => "$tb/vsnmpit");
%allowed = ( "avail" => "$TB/bin/avail",
"inuse" => "$TB/bin/inuse",
"mac2if" => "$TB/bin/mac2if",
"nalloc" => "$TB/bin/nalloc",
"nfree" => "$TB/bin/nfree",
"nodeip" => "$TB/bin/nodeip",
"ns" => "$TB/bin/ns",
"power" => "$TB/bin/power",
"snmpit" => "$TB/bin/snmpit",
"tbprerun" => "$TB/bin/tbprerun",
"tbreport" => "$TB/bin/tbreport",
"tbrun" => "$TB/bin/tbrun",
"tbend" => "$TB/bin/tbend",
"vpower" => "$TB/bin/vpower",
"vsnmpit" => "$TB/bin/vsnmpit");
# Need to provide a simple path, because some scripts we call need one
$ENV{PATH} = "/usr/testbed/bin:/bin:/usr/bin:/usr/local/bin";
$ENV{PATH} = "$TB/bin:/bin:/usr/bin:/usr/local/bin";
# Clean the environment of potentially nasty variables
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
......
......@@ -540,6 +540,7 @@ int main(int argc, char *argv[])
exit(118);
}
#ifndef TESTBED
/*
* Error out if the file is setuid or setgid.
*/
......@@ -548,7 +549,6 @@ int main(int argc, char *argv[])
exit(119);
}
#ifndef TESTBED
/*
* Error out if the target name/group is different from
* the name/group of the cwd or the program.
......
......@@ -89,55 +89,4 @@
#define GID_MIN 100
#endif
/*
* USERDIR_SUFFIX -- Define to be the subdirectory under users'
* home directories where suEXEC access should
* be allowed. All executables under this directory
* will be executable by suEXEC as the user so
* they should be "safe" programs. If you are
* using a "simple" UserDir directive (ie. one
* without a "*" in it) this should be set to
* the same value. suEXEC will not work properly
* in cases where the UserDir directive points to
* a location that is not the same as the user's
* home directory as referenced in the passwd file.
*
* If you have VirtualHosts with a different
* UserDir for each, you will need to define them to
* all reside in one parent directory; then name that
* parent directory here. IF THIS IS NOT DEFINED
* PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK!
* See the suEXEC documentation for more detailed
* information.
*/
#ifndef USERDIR_SUFFIX
#define USERDIR_SUFFIX "public_html"
#endif
/*