Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2011 09:14:25 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223585 - head/sbin/hastd
Message-ID:  <201106270914.p5R9EPlQ089904@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Mon Jun 27 09:14:25 2011
New Revision: 223585
URL: http://svn.freebsd.org/changeset/base/223585

Log:
  Compile capsicum support only if HAVE_CAPSICUM is defined.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/subr.c

Modified: head/sbin/hastd/subr.c
==============================================================================
--- head/sbin/hastd/subr.c	Mon Jun 27 09:10:48 2011	(r223584)
+++ head/sbin/hastd/subr.c	Mon Jun 27 09:14:25 2011	(r223585)
@@ -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;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106270914.p5R9EPlQ089904>