summaryrefslogtreecommitdiffstats
path: root/sbin/hastctl/hastctl.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-05-14 17:02:03 +0000
committerpjd <pjd@FreeBSD.org>2011-05-14 17:02:03 +0000
commiteccd4beb3103b0b32ea5cd6fbbde55a9c716bd8a (patch)
tree4582135bbbedab14d50df3c3ec3b7ec8b4f47185 /sbin/hastctl/hastctl.c
parent7da3a41fe756ba53dacecfb469b71cc1fd6469bc (diff)
downloadFreeBSD-src-eccd4beb3103b0b32ea5cd6fbbde55a9c716bd8a.zip
FreeBSD-src-eccd4beb3103b0b32ea5cd6fbbde55a9c716bd8a.tar.gz
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
Diffstat (limited to 'sbin/hastctl/hastctl.c')
-rw-r--r--sbin/hastctl/hastctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c
index cf692ce..c4cd6a4 100644
--- a/sbin/hastctl/hastctl.c
+++ b/sbin/hastctl/hastctl.c
@@ -480,7 +480,7 @@ main(int argc, char *argv[])
cfg->hc_controladdr);
}
- if (drop_privs(true) != 0)
+ if (drop_privs(NULL) != 0)
exit(EX_CONFIG);
/* Send the command to the server... */
OpenPOWER on IntegriCloud