Merge an applicable subset of r263234 from HEAD to stable/10:

Update most userspace consumers of capability.h to use capsicum.h instead.

  auditdistd is not updated as I will make the change upstream and then do a
  vendor import sometime in the next week or two.

Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc.  When these features
are merged, the capsicum.h change will need to be merged with them.

Sponsored by:	Google, Inc.
This commit is contained in:
rwatson 2015-03-19 12:32:48 +00:00
parent b9b03fb7e3
commit bcbbcda0f2
25 changed files with 29 additions and 29 deletions

View File

@ -69,7 +69,7 @@ extern int SIZE_BUF;
#include <string.h>
#include <limits.h>
#ifdef __FreeBSD__
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/ioccom.h>
#include <sys/types.h>
#include <sys/sysctl.h>

View File

@ -23,7 +23,7 @@ __RCSID("$FreeBSD$");
#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>

View File

@ -30,7 +30,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <assert.h>
#include <errno.h>

View File

@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$");
#include <sys/conf.h>
#include <sys/ksem.h>
#include <sys/mman.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#define _KERNEL
#include <sys/mount.h>
#include <sys/pipe.h>

View File

@ -43,11 +43,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/capability.h>
#include <sys/capsicum.h>
#include "dhcpd.h"
#include "privsep.h"
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/ioctl.h>
#include <sys/uio.h>

View File

@ -56,12 +56,12 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/capability.h>
#include <sys/capsicum.h>
#include "dhcpd.h"
#include "privsep.h"
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <net80211/ieee80211_freebsd.h>

View File

@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/jail.h>
#include <sys/stat.h>
#ifdef HAVE_CAPSICUM
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <geom/gate/g_gate.h>
#endif

View File

@ -31,7 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/procdesc.h>
#include <sys/socket.h>
#include <sys/wait.h>

View File

@ -31,7 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/procdesc.h>
#include <sys/wait.h>

View File

@ -31,7 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/ioctl.h>
#include <sys/procdesc.h>
#include <sys/socket.h>

View File

@ -38,7 +38,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <sys/mman.h>
#include <sys/mount.h>

View File

@ -37,7 +37,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <sys/mman.h>
#include <sys/mount.h>

View File

@ -33,7 +33,7 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <sys/ipc.h>
#include <sys/mman.h>

View File

@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsium.h>
#include <sys/errno.h>
#include <sys/procdesc.h>
#include <sys/resource.h>

View File

@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <sys/procdesc.h>
#include <sys/resource.h>

View File

@ -31,7 +31,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <err.h>

View File

@ -35,7 +35,7 @@
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#include <sys/sysctl.h>
#include <sys/wait.h>

View File

@ -46,7 +46,7 @@ extern int errno;
#include <sys/errno.h>
#undef _KERNEL
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/errno.h>
#define _KERNEL
#include <sys/time.h>

View File

@ -190,7 +190,7 @@ cat <<_EOF_
#include <sys/umtx.h>
#include <nfsserver/nfs.h>
#include <ufs/ufs/quota.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@ -451,7 +451,7 @@ _EOF_
auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h"
auto_switch_type "acltypename" "ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+" "sys/acl.h"
auto_or_type "capfcntlname" "CAP_FCNTL_[A-Z]+[[:space:]]+\(1" "sys/capability.h"
auto_or_type "capfcntlname" "CAP_FCNTL_[A-Z]+[[:space:]]+\(1" "sys/capsicum.h"
auto_switch_type "extattrctlname" "EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+" "sys/extattr.h"
auto_switch_type "fadvisebehavname" "POSIX_FADV_[A-Z]+[[:space:]]+[0-9]+" "sys/fcntl.h"
auto_or_type "flagsname" "O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/fcntl.h"
@ -739,7 +739,7 @@ cat <<_EOF_
}
_EOF_
egrep '#define[[:space:]]+CAP_[A-Z_]+[[:space:]]+CAPRIGHT\([0-9],[[:space:]]+0x[0-9]{16}ULL\)' \
$include_dir/sys/capability.h | \
$include_dir/sys/capsicum.h | \
sed -E 's/[ ]+/ /g' | \
awk -F '[ \(,\)]' '
BEGIN {

View File

@ -27,7 +27,7 @@
*/
#include <sys/param.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <sys/un.h>

View File

@ -43,7 +43,7 @@ static char sccsid[] = "@(#)rwho.c 8.1 (Berkeley) 6/6/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/file.h>

View File

@ -44,7 +44,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <ctype.h>
#include <err.h>

View File

@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/queue.h>
#include <sys/callout.h>
#include <sys/sbuf.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <assert.h>
#include <bsdxml.h>
#include <ctype.h>

View File

@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/linker.h>
#include <sys/socket.h>
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/wait.h>
#include <assert.h>
#include <errno.h>

View File

@ -43,7 +43,7 @@ static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/capability.h>
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>