From 699b26bdce09db5d87d1442f2499595712916183 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 27 Jun 2011 09:14:25 +0000 Subject: [PATCH] Compile capsicum support only if HAVE_CAPSICUM is defined. MFC after: 3 days --- sbin/hastd/subr.c | 4 ++++ 1 file changed, 4 insertions(+) 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 __FBSDID("$FreeBSD$"); +#ifdef HAVE_CAPSICUM #include +#endif #include #include #include @@ -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; /*