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;
 
        /*
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to