Page 1 of 1
halt -f in a chroot halts computer
Posted:
Sun Apr 06, 2003 2:27 pm
by raphinou
With all chroot restrictions activated, issuing halt -f in a chroot still halts the computer. Is that normal?
Raph
Posted:
Sun Apr 06, 2003 2:52 pm
by raphinou
Further testing:
I'm using Debian and create a chroot sys with debootstrap. When issuing /etc/init.d/rc 0 without the halt command, I get a really strange behaviour: it looks as if I go in and out of the chroot.
Eg, when hitting enter several times:
webserver:/home/rb#
webserver:/etc/rc0.d#
webserver:/home/rb#
webserver:/etc/rc0.d#
webserver:/home/rb#
the line with rc0 est the direcory in the chroot where I was when issuing /etc/init.d/rc 0
Now, I want to do a ls:
webserver:/etc/rc0.d# l
bash: l: command not found
webserver:/home/rb# s
bash: s: command not found
This is what I got when I hit the backspace key 2 or 3 times:
webserver:/home/rb#
webserver:/etc/rc0.d# exit
There are stopped jobs.
webserver:/home/rb# exit
exit
rb@webserver:~$
I'm back in the root environment as normal user (so my chroot was terminated as well as my su)
Not sure I'm doing something really clean...... Just wanted to share the experience....
RAph
Posted:
Sun Apr 06, 2003 3:46 pm
by spender
Are you using the latest version of grsec? If not, try it. I changed some of the capabilities that are dropped in the chroot.
-Brad