Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
75b0e86c
Commit
75b0e86c
authored
Dec 21, 2000
by
Leigh B. Stoller
Browse files
Add rmacct-ctrl wrapper.
parent
417441f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/GNUmakefile
View file @
75b0e86c
...
...
@@ -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
...
...
tbsetup/rmacct-ctrl_wrapper
0 → 100755
View file @
75b0e86c
#!/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
";
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment