All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 75b0e86c authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add rmacct-ctrl wrapper.

parent 417441f1
......@@ -9,7 +9,7 @@ SCRIPTS = mkprojdir_wrapper tbdoit tbstopit mkexpdir \
delay_setup ifc_setup ifc_filegen \
ir2ifc power resetvlans savevlans snmpit tbend \
tbprerun tbreport vpower vsnmpit killtip \
mkacct-ctrl_wrapper rmprojdir_wrapper
mkacct-ctrl_wrapper rmacct-ctrl_wrapper rmprojdir_wrapper
DATAFILES = default.ifc
SUSCRIPTS = mkprojdir rmprojdir os_setup mkacct rmacct \
mkacct-ctrl rmacct-ctrl ifc_setup os_load
......@@ -26,11 +26,7 @@ checkpass:
#
INSTALL_LIBTBDIR = $(INSTALL_LIBDIR)/tbsetup
install: $(addprefix $(INSTALL_BINDIR)/, $(SCRIPTS)) \
$(addprefix $(INSTALL_BINDIR)/, $(SUSCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(SCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(DATAFILES)) \
subdir-install
install: script-install subdir-install
@echo "Don't forget to do a post-install as root"
#
......@@ -39,7 +35,12 @@ install: $(addprefix $(INSTALL_BINDIR)/, $(SCRIPTS)) \
subdir-install:
@$(MAKE) -C checkpass install
@$(MAKE) -C ir install
@$(MAKE) -C ns2ir install
@$(MAKE) -C ns2ir install
script-install: $(addprefix $(INSTALL_BINDIR)/, $(SCRIPTS)) \
$(addprefix $(INSTALL_BINDIR)/, $(SUSCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(SCRIPTS)) \
$(addprefix $(INSTALL_LIBTBDIR)/, $(DATAFILES))
#
# Leave these rules here. They should be flushed when we no longer
......
#!/usr/local/bin/perl -wT
# Wrapper for running rmacct-ctrl from the web page. See comment in
# mkprojdir-wrapper for logic.
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Check args.
#
if ($#ARGV < 0) {
die("Usage: rmacct-ctrl_wrapper <target_uid>\n");
}
my $target_uid = $ARGV[0];
#
# Untaint the argument.
#
if ($target_uid =~ /^([A-Z0-9-]+)$/i) {
$target_uid = $1;
} else {
die("Invalid target_uid; '$target_uid' contains illegal characters.\n");
}
exec "/usr/testbed/bin/rmacct-ctrl $target_uid";
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