[PATCH] correct header for Capsicum

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



In FreeBSD 10 and newer, <sys/capability.h> has been renamed to
<sys/capsicum.h>, due to a potential conflict with POSIX capabilities.
The old header remains as a wrapper for now, but may be replaced at some
future point.  In addition, both the new and the old headers require
<sys/types.h>, so configure will complain that they are present but not
compilable.  The following patch, relative to 7.1p2, fixes both issues:

Index: configure.ac
===================================================================
--- configure.ac	(revision 294088)
+++ configure.ac	(working copy)
@@ -405,7 +405,6 @@
 	sys/audit.h \
 	sys/bitypes.h \
 	sys/bsdtty.h \
-	sys/capability.h \
 	sys/cdefs.h \
 	sys/dir.h \
 	sys/mman.h \
@@ -435,6 +434,13 @@
 	vis.h \
 ])
 
+# sys/capsicum.h requires sys/types.h
+AC_CHECK_HEADERS([sys/capsicum.h], [], [], [
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+])
+
 # lastlog.h requires sys/time.h to be included first on Solaris
 AC_CHECK_HEADERS([lastlog.h], [], [], [
 #ifdef HAVE_SYS_TIME_H
Index: sandbox-capsicum.c
===================================================================
--- sandbox-capsicum.c	(revision 294088)
+++ sandbox-capsicum.c	(working copy)
@@ -22,7 +22,7 @@
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-#include <sys/capability.h>
+#include <sys/capsicum.h>
 
 #include <errno.h>
 #include <stdarg.h>

DES
-- 
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux