Setuid within chroot

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

Setuid within chroot

Postby sychan » Tue Jul 22, 2003 8:41 pm

Hello,

I have what I think is a simple question. I have setup a chroot jail for a service, and I want my startup script to chroot and then perform the setuid to the lower privilege user (or su and then chroot, either way).

What is the easiest way to do this? After looking through the docs, it seems that what I want to do is enable the ACL system, and then put an ACL on the setuid binary. Is there a better, more straightforward way to handle this?

Thanks,
Steve
sychan
 
Posts: 2
Joined: Tue Jul 22, 2003 8:37 pm

Postby lroma » Tue Oct 14, 2003 10:21 am

have a look at daemontools: http://cr.yp.to/daemontools/setuidgid.html

here an example for running "program" as nobody in a chroot jail:
/usr/sbin/chroot /chroot/program /lib/setuidgid nobody program

bye,
lele
lroma
 
Posts: 5
Joined: Mon Apr 07, 2003 9:01 am


Return to grsecurity support