Date: Mon, 16 Jun 1997 17:37:37 +0200 (MET DST) From: Zahemszky Gabor <zgabor@CoDe.hu> To: freebsd-questions@freebsd.org (FreeBSD questions) Cc: psd@worldaccess.nl Subject: Re: Restricted Shell Message-ID: <199706161537.RAA00302@CoDe.hu> In-Reply-To: <Pine.LNX.3.95.970612181946.1614A-100000@dolphin.psd> from Paul Dekkers at "Jun 12, 97 06:22:03 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi > > What's the best method of ristricting a shell under FreeBSD or any other > UNIX? Not very good, but try to get pdksh, and use it as a restricted Bourne- or Korn-shell. Bye, Gabor -- #!/bin/ksh Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706161537.RAA00302>