summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-06-27 09:14:25 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-06-27 09:14:25 +0000
commit699b26bdce09db5d87d1442f2499595712916183 (patch)
treee29e68d579dd9fd5da739c4a3b35110d6d0104c7 /sbin
parent133d75ed187c4e4d73965a6768584f5a62a7549c (diff)
downloadsrc-test2-699b26bdce09db5d87d1442f2499595712916183.tar.gz
src-test2-699b26bdce09db5d87d1442f2499595712916183.zip
Notes
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 4e9dee092735..89ffda0fe2f3 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;
/*