]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Currently we are unable to use capsicum for the primary worker process,
authorPawel Jakub Dawidek <pjd@FreeBSD.org>
Sat, 14 May 2011 17:02:03 +0000 (17:02 +0000)
committerPawel Jakub Dawidek <pjd@FreeBSD.org>
Sat, 14 May 2011 17:02:03 +0000 (17:02 +0000)
commit0cddb12ffd5d10e7805ea269afea0f5a41671fcf
tree4582135bbbedab14d50df3c3ec3b7ec8b4f47185
parentbcc9f32110ae7b8b1094c010ceb188c00656afda
Currently we are unable to use capsicum for the primary worker process,
because we need to do ioctl(2)s, which are not permitted in the capability
mode. What we do now is to chroot(2) to /var/empty, which restricts access
to file system name space and we drop privileges to hast user and hast
group.

This still allows to access to other name spaces, like list of processes,
network and sysvipc.

To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict
access to process table, network (we use ip-less jails) and sysvipc (if
security.jail.sysvipc_allowed is turned off). This provides much better
separation.

MFC after: 1 week
sbin/hastctl/hastctl.c
sbin/hastd/primary.c
sbin/hastd/secondary.c
sbin/hastd/subr.c
sbin/hastd/subr.h