Author: rwatson Date: Thu Mar 19 12:32:48 2015 New Revision: 280250 URL: https://svnweb.freebsd.org/changeset/base/280250
Log: 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. Modified: stable/10/contrib/tcpdump/tcpdump.c stable/10/crypto/openssh/sandbox-capsicum.c stable/10/lib/libc/gen/cap_sandboxed.c stable/10/lib/libprocstat/libprocstat.c stable/10/sbin/dhclient/bpf.c stable/10/sbin/dhclient/dhclient.c stable/10/sbin/hastd/subr.c stable/10/tools/regression/capsicum/syscalls/cap_fcntls_limit.c stable/10/tools/regression/capsicum/syscalls/cap_getmode.c stable/10/tools/regression/capsicum/syscalls/cap_ioctls_limit.c stable/10/tools/regression/security/cap_test/cap_test_capabilities.c stable/10/tools/regression/security/cap_test/cap_test_capmode.c stable/10/tools/regression/security/cap_test/cap_test_fcntl.c stable/10/tools/regression/security/cap_test/cap_test_pdfork.c stable/10/tools/regression/security/cap_test/cap_test_pdkill.c stable/10/tools/regression/security/cap_test/cap_test_relative.c stable/10/tools/regression/security/cap_test/cap_test_sysctl.c stable/10/usr.bin/kdump/kdump.c stable/10/usr.bin/kdump/mksubr stable/10/usr.bin/procstat/procstat_files.c stable/10/usr.bin/rwho/rwho.c stable/10/usr.bin/uniq/uniq.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/iscsid/iscsid.c stable/10/usr.sbin/rwhod/rwhod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tcpdump/tcpdump.c ============================================================================== --- stable/10/contrib/tcpdump/tcpdump.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/contrib/tcpdump/tcpdump.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/crypto/openssh/sandbox-capsicum.c ============================================================================== --- stable/10/crypto/openssh/sandbox-capsicum.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/crypto/openssh/sandbox-capsicum.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/lib/libc/gen/cap_sandboxed.c ============================================================================== --- stable/10/lib/libc/gen/cap_sandboxed.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/lib/libc/gen/cap_sandboxed.c Thu Mar 19 12:32:48 2015 (r280250) @@ -30,7 +30,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/capability.h> +#include <sys/capsicum.h> #include <assert.h> #include <errno.h> Modified: stable/10/lib/libprocstat/libprocstat.c ============================================================================== --- stable/10/lib/libprocstat/libprocstat.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/lib/libprocstat/libprocstat.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/sbin/dhclient/bpf.c ============================================================================== --- stable/10/sbin/dhclient/bpf.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/sbin/dhclient/bpf.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/sbin/dhclient/dhclient.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/sbin/hastd/subr.c ============================================================================== --- stable/10/sbin/hastd/subr.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/sbin/hastd/subr.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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 Modified: stable/10/tools/regression/capsicum/syscalls/cap_fcntls_limit.c ============================================================================== --- stable/10/tools/regression/capsicum/syscalls/cap_fcntls_limit.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/capsicum/syscalls/cap_fcntls_limit.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/capsicum/syscalls/cap_getmode.c ============================================================================== --- stable/10/tools/regression/capsicum/syscalls/cap_getmode.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/capsicum/syscalls/cap_getmode.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/capsicum/syscalls/cap_ioctls_limit.c ============================================================================== --- stable/10/tools/regression/capsicum/syscalls/cap_ioctls_limit.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/capsicum/syscalls/cap_ioctls_limit.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_capmode.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_capmode.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_capmode.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_fcntl.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_fcntl.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_fcntl.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_pdfork.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_pdfork.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_pdfork.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_pdkill.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_pdkill.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_pdkill.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_relative.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_relative.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_relative.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/tools/regression/security/cap_test/cap_test_sysctl.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_sysctl.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/tools/regression/security/cap_test/cap_test_sysctl.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.bin/kdump/kdump.c ============================================================================== --- stable/10/usr.bin/kdump/kdump.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.bin/kdump/kdump.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.bin/kdump/mksubr ============================================================================== --- stable/10/usr.bin/kdump/mksubr Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.bin/kdump/mksubr Thu Mar 19 12:32:48 2015 (r280250) @@ -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 { Modified: stable/10/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_files.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.bin/procstat/procstat_files.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.bin/rwho/rwho.c ============================================================================== --- stable/10/usr.bin/rwho/rwho.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.bin/rwho/rwho.c Thu Mar 19 12:32:48 2015 (r280250) @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)rwho.c 8.1 ( #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/capability.h> +#include <sys/capsicum.h> #include <sys/param.h> #include <sys/file.h> Modified: stable/10/usr.bin/uniq/uniq.c ============================================================================== --- stable/10/usr.bin/uniq/uniq.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.bin/uniq/uniq.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.sbin/ctld/kernel.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.sbin/iscsid/iscsid.c ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.sbin/iscsid/iscsid.c Thu Mar 19 12:32:48 2015 (r280250) @@ -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> Modified: stable/10/usr.sbin/rwhod/rwhod.c ============================================================================== --- stable/10/usr.sbin/rwhod/rwhod.c Thu Mar 19 12:22:57 2015 (r280249) +++ stable/10/usr.sbin/rwhod/rwhod.c Thu Mar 19 12:32:48 2015 (r280250) @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)rwhod.c 8.1 #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> _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"