Robert Connolly cendres at videotron.ca
Fri Jan 23 14:28:49 PST 2004

On January 23, 2004 03:32 pm, Archaic wrote:
> On Fri, Jan 23, 2004 at 08:48:02AM -0500, Robert Connolly wrote:
> > Anything thoughts on using rbash (or rksh) for boot scripts? It would
> > prevent LD_PRELOAD, among other things. Redirecting data needs to be done
> > with dd. And root's bashrc would need to only use /bin and /sbin. rbash
> > doesn't stop anyone from opening another shell within rbash (be it
> > uploaded or whatever) so its not much of a security messure. But it does
> > button up what the scripts can do.
> Is rbash to be symlinked to /bin/sh? Is there anything else that might
> need /bin/sh that would bark on rbash?
> Either way, I don't know enough about it to know if it's worth the cost.
> Seems to be script == program. If you don't trust it, dont' run it.
> Luckily with a script you can easily see what it does and how.
> I'll read up on it this weekend and give a real opinion once I know a
> bit more.

rbash reads ~/.bashrc, bash -r will zero out PATH. Neither allow for /'s in 
command line arguments. It wouldn't work very well as the default shell. But 
for scripts it would force a different design to comply with the restictions. 
I'm seeing if rbash scripts can get enviroment from /etc/rc.conf instead of 
~/.bashrc somehow. sh --restricted will ignore ~/.bashrc and just look 
for .profile.

More information about the hlfs-dev mailing list