From 1a43c488bc63ee815a24d85dd79fee6565996ed4 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 2 Feb 2006 22:57:38 +0000 Subject: Reflect character whitelisting in rc.d-script --- ezjail.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ezjail.sh b/ezjail.sh index c730fe7..af842fc 100755 --- a/ezjail.sh +++ b/ezjail.sh @@ -27,7 +27,7 @@ stop_cmd="do_stop" do_start() { - [ -n "$*" ] && jail_list=`echo $* | tr /~. ___` || echo " ezjail" + [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _` || echo " ezjail" jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done sh /etc/rc.d/jail onestart $jail_list @@ -35,7 +35,7 @@ do_start() do_restart() { - [ -n "$*" ] && jail_list=`echo $* | tr /~. ___`; + [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _`; jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done sh /etc/rc.d/jail onestop $jail_list @@ -44,7 +44,7 @@ do_restart() do_stop() { - [ -n "$*" ] && jail_list=`echo $* | tr /~. ___` || echo " ezjail" + [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _` || echo " ezjail" jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done sh /etc/rc.d/jail onestop $jail_list -- cgit v1.2.3