[uw.unix] How do I make a user shell run with chroot?

andrewt@watsnew.waterloo.edu (Andrew Thomas) (08/19/89)

I would like to modify a user login shell to include a call to chroot
at the beginning of the shell.  This is easily accomplished by using
bash for which I have sources.  The problem is that chroot is only
callable by the superuser.  This means that the shell would have to be
setuid to root, which kind of introduces a security problem.  Is there
a way to have a normal user log on and only see one branch of the
directory tree?  Is it possible for the shell, for example, to change
its own uid to it changes back to the user's uid after the chroot call
has been made?  I jes' gots to know!

Thanks,
--

Andrew Thomas
andrewt@watsnew.waterloo.edu	Systems Design Eng.	University of Waterloo
"If a million people do a stupid thing, it's still a stupid thing." - Opus