halt -f in a chroot halts computer

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

halt -f in a chroot halts computer

Postby raphinou » Sun Apr 06, 2003 2:27 pm

With all chroot restrictions activated, issuing halt -f in a chroot still halts the computer. Is that normal?



Raph
raphinou
 
Posts: 5
Joined: Sun Apr 06, 2003 7:26 am

Postby raphinou » Sun Apr 06, 2003 2:52 pm

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
raphinou
 
Posts: 5
Joined: Sun Apr 06, 2003 7:26 am

Postby spender » Sun Apr 06, 2003 3:46 pm

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
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm


Return to grsecurity support

cron