What difference? (running screen in chroot)

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

What difference? (running screen in chroot)

Postby `VL » Sun Sep 18, 2005 4:00 pm

i`d like to run program in screen under chrooted enviroment.

When i try to run screen, i get error: "Must be connected to a terminal."

I searched a bit and found that problem is in device files. for example see this thread: http://lists.gnu.org/archive/html/scree ... 00068.html

I tried to create all required device files under chroot,but no luck.

When i made mount --bind /dev/ /my/chroot/dev, screen seems to work.

What is the difference if i have /my/chroot/dev mounted with --bind or i have device files naturally in dir?

does anyone succeded in running screen under chroot with grsecurity?
============
I ran strace in both cases and made diff file on strace logs. Diff is here:
http://rafb.net/paste/results/McLhkE85.html [24 hours]

Looks pretty same till line 155, after that changes start. ( some condition met?)
`VL
 
Posts: 28
Joined: Wed Feb 23, 2005 2:11 pm

Postby SG » Mon Sep 19, 2005 2:26 am

It is desirable and enought have these files into /dev:
full
null
ptmx
random
tty
tty0
tty1
tty10
tty11
tty12
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
urandom
zero

Also you need mount /dev/pts (/chroot dir/dev/pts)
SG
 
Posts: 18
Joined: Thu Dec 09, 2004 2:32 am

Postby `VL » Mon Sep 19, 2005 4:07 am

SG wrote:It is desirable and enought have these files into /dev:
full
null
ptmx
random
tty
tty0
tty1
tty10
tty11
tty12
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
urandom
zero

Also you need mount /dev/pts (/chroot dir/dev/pts)


I do have all these files in /chroot/dev and i mounted /chroot/dev/pts. (Actually i copied ALL /dev into chroot and mounted pts). But when
i run screen in chrooted enviroment, i get error.

If i do 'mount --bind /dev /chroot/dev' screen starts.
`VL
 
Posts: 28
Joined: Wed Feb 23, 2005 2:11 pm


Return to grsecurity support