summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-06-27 09:14:25 +0000
committerpjd <pjd@FreeBSD.org>2011-06-27 09:14:25 +0000
commitfaa028ceabd36900890c02260e8f7e780a235a31 (patch)
treee29e68d579dd9fd5da739c4a3b35110d6d0104c7 /sbin
parent6a3c287a8944f41a733f12cb13fcab4f087b96dd (diff)
downloadFreeBSD-src-faa028ceabd36900890c02260e8f7e780a235a31.zip
FreeBSD-src-faa028ceabd36900890c02260e8f7e780a235a31.tar.gz
Compile capsicum support only if HAVE_CAPSICUM is defined.
MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/subr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c
index 4e9dee0..89ffda0 100644
--- a/sbin/hastd/subr.c
+++ b/sbin/hastd/subr.c
@@ -31,7 +31,9 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#ifdef HAVE_CAPSICUM
#include <sys/capability.h>
+#endif
#include <sys/param.h>
#include <sys/disk.h>
#include <sys/ioctl.h>
@@ -230,6 +232,7 @@ drop_privs(struct hast_resource *res)
* ioctls and secondary uses ioctls to handle BIO_DELETE and BIO_FLUSH.
* For now capsicum is only used to sandbox hastctl.
*/
+#ifdef HAVE_CAPSICUM
if (res == NULL) {
capsicum = (cap_enter() == 0);
if (!capsicum) {
@@ -237,6 +240,7 @@ drop_privs(struct hast_resource *res)
"Unable to sandbox using capsicum");
}
} else
+#endif
capsicum = false;
/*
OpenPOWER on IntegriCloud