freebsd-nq/contrib
Pawel Jakub Dawidek 2609222ab4 Merge Capsicum overhaul:
- Capability is no longer separate descriptor type. Now every descriptor
  has set of its own capability rights.

- The cap_new(2) system call is left, but it is no longer documented and
  should not be used in new code.

- The new syscall cap_rights_limit(2) should be used instead of
  cap_new(2), which limits capability rights of the given descriptor
  without creating a new one.

- The cap_getrights(2) syscall is renamed to cap_rights_get(2).

- If CAP_IOCTL capability right is present we can further reduce allowed
  ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed
  ioctls can be retrived with cap_ioctls_get(2) syscall.

- If CAP_FCNTL capability right is present we can further reduce fcntls
  that can be used with the new cap_fcntls_limit(2) syscall and retrive
  them with cap_fcntls_get(2).

- To support ioctl and fcntl white-listing the filedesc structure was
  heavly modified.

- The audit subsystem, kdump and procstat tools were updated to
  recognize new syscalls.

- Capability rights were revised and eventhough I tried hard to provide
  backward API and ABI compatibility there are some incompatible changes
  that are described in detail below:

	CAP_CREATE old behaviour:
	- Allow for openat(2)+O_CREAT.
	- Allow for linkat(2).
	- Allow for symlinkat(2).
	CAP_CREATE new behaviour:
	- Allow for openat(2)+O_CREAT.

	Added CAP_LINKAT:
	- Allow for linkat(2). ABI: Reuses CAP_RMDIR bit.
	- Allow to be target for renameat(2).

	Added CAP_SYMLINKAT:
	- Allow for symlinkat(2).

	Removed CAP_DELETE. Old behaviour:
	- Allow for unlinkat(2) when removing non-directory object.
	- Allow to be source for renameat(2).

	Removed CAP_RMDIR. Old behaviour:
	- Allow for unlinkat(2) when removing directory.

	Added CAP_RENAMEAT:
	- Required for source directory for the renameat(2) syscall.

	Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR):
	- Allow for unlinkat(2) on any object.
	- Required if target of renameat(2) exists and will be removed by this
	  call.

	Removed CAP_MAPEXEC.

	CAP_MMAP old behaviour:
	- Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and
	  PROT_WRITE.
	CAP_MMAP new behaviour:
	- Allow for mmap(2)+PROT_NONE.

	Added CAP_MMAP_R:
	- Allow for mmap(PROT_READ).
	Added CAP_MMAP_W:
	- Allow for mmap(PROT_WRITE).
	Added CAP_MMAP_X:
	- Allow for mmap(PROT_EXEC).
	Added CAP_MMAP_RW:
	- Allow for mmap(PROT_READ | PROT_WRITE).
	Added CAP_MMAP_RX:
	- Allow for mmap(PROT_READ | PROT_EXEC).
	Added CAP_MMAP_WX:
	- Allow for mmap(PROT_WRITE | PROT_EXEC).
	Added CAP_MMAP_RWX:
	- Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC).

	Renamed CAP_MKDIR to CAP_MKDIRAT.
	Renamed CAP_MKFIFO to CAP_MKFIFOAT.
	Renamed CAP_MKNODE to CAP_MKNODEAT.

	CAP_READ old behaviour:
	- Allow pread(2).
	- Disallow read(2), readv(2) (if there is no CAP_SEEK).
	CAP_READ new behaviour:
	- Allow read(2), readv(2).
	- Disallow pread(2) (CAP_SEEK was also required).

	CAP_WRITE old behaviour:
	- Allow pwrite(2).
	- Disallow write(2), writev(2) (if there is no CAP_SEEK).
	CAP_WRITE new behaviour:
	- Allow write(2), writev(2).
	- Disallow pwrite(2) (CAP_SEEK was also required).

	Added convinient defines:

	#define	CAP_PREAD		(CAP_SEEK | CAP_READ)
	#define	CAP_PWRITE		(CAP_SEEK | CAP_WRITE)
	#define	CAP_MMAP_R		(CAP_MMAP | CAP_SEEK | CAP_READ)
	#define	CAP_MMAP_W		(CAP_MMAP | CAP_SEEK | CAP_WRITE)
	#define	CAP_MMAP_X		(CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL)
	#define	CAP_MMAP_RW		(CAP_MMAP_R | CAP_MMAP_W)
	#define	CAP_MMAP_RX		(CAP_MMAP_R | CAP_MMAP_X)
	#define	CAP_MMAP_WX		(CAP_MMAP_W | CAP_MMAP_X)
	#define	CAP_MMAP_RWX		(CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X)
	#define	CAP_RECV		CAP_READ
	#define	CAP_SEND		CAP_WRITE

	#define	CAP_SOCK_CLIENT \
		(CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \
		 CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN)
	#define	CAP_SOCK_SERVER \
		(CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \
		 CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \
		 CAP_SETSOCKOPT | CAP_SHUTDOWN)

	Added defines for backward API compatibility:

	#define	CAP_MAPEXEC		CAP_MMAP_X
	#define	CAP_DELETE		CAP_UNLINKAT
	#define	CAP_MKDIR		CAP_MKDIRAT
	#define	CAP_RMDIR		CAP_UNLINKAT
	#define	CAP_MKFIFO		CAP_MKFIFOAT
	#define	CAP_MKNOD		CAP_MKNODAT
	#define	CAP_SOCK_ALL		(CAP_SOCK_CLIENT | CAP_SOCK_SERVER)

Sponsored by:	The FreeBSD Foundation
Reviewed by:	Christoph Mallon <christoph.mallon@gmx.de>
Many aspects discussed with:	rwatson, benl, jonathan
ABI compatibility discussed with:	kib
2013-03-02 00:53:12 +00:00
..
amd
atf Add ATF update instructions and file exclude list. 2012-11-15 04:51:37 +00:00
bind9 Update to 9.8.4-P1. 2012-12-07 12:39:58 +00:00
binutils Clear the memory allocated to build the unwind tables. This fixes C++ 2013-02-27 06:53:15 +00:00
bmake Merge bmake-20130123 2013-02-01 22:55:27 +00:00
bsnmp Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
byacc update to version 20120526 2012-09-14 21:17:53 +00:00
bzip2 Remove a few files that are not needed for FreeBSD. 2012-09-11 21:16:22 +00:00
com_err - On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5. 2012-05-21 04:29:11 +00:00
compiler-rt Don't use the pcs attribute on compilers that don't support it. We can 2013-01-19 02:24:14 +00:00
cvs Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
dialog Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
diff Catch up with the subversion conversion and apply these build-time patches. 2012-08-17 18:20:38 +00:00
dtc Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
ee Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
expat Update base system libexpat to 2.1.0. 2013-02-26 00:58:44 +00:00
file Add support for Lua 5.2. 2013-01-11 17:34:30 +00:00
gcc Add #undef TARGET_DEFAULT back as it shouldn't have been removed in r245539 2013-02-04 09:42:12 +00:00
gcclibs Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
gdb Extend GDB to check the value in the .note.tag section along with the 2013-02-04 06:59:33 +00:00
gdtoa Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
gperf Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
groff Add libsbuf. 2012-09-22 17:47:37 +00:00
ipfilter Retire struct sockaddr_inarp. 2013-01-31 08:55:21 +00:00
jemalloc Update list of ports required for importing jemalloc. 2013-01-24 03:33:15 +00:00
ldns #if out unused functions which trip up gcc but not clang. 2013-02-16 22:16:14 +00:00
less MFV: less v456. 2012-12-03 19:00:23 +00:00
libarchive Fix an obvious typo that broke time specifications of the form 2013-02-02 06:06:39 +00:00
libbegemot
libc-pwcache Replace our version of the pwcache(3) API with NetBSD's implementation. 2012-10-19 12:44:22 +00:00
libc-vis Replace our implementation of the vis(3) and unvis(3) APIs with 2012-12-18 16:37:24 +00:00
libc++ Import new libc++ to head. Various small fixes and cleanups. 2013-02-07 15:45:28 +00:00
libcxxrt Fix a copy-and-paste error in libcxxrt. 2013-02-07 11:08:03 +00:00
libpcap Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
libreadline
libstdc++ Allow the unwind functions int libgcc_s to interact correctly with libthr. 2013-02-04 09:28:36 +00:00
llvm Pull in r175962 from upstream llvm trunk: 2013-02-23 22:48:12 +00:00
lukemftpd Make lukemftpd properly set login class and cpumask. 2011-06-30 20:58:38 +00:00
mdocml strcmp(3) will suffice here, also follow the style of the remaining file more closely. 2012-10-20 10:16:55 +00:00
mknod Add NetBSD's mtree to the tree and install it as nmtree as the first step 2012-12-21 21:00:00 +00:00
mtree Add NetBSD's mtree to the tree and install it as nmtree as the first step 2012-12-21 21:00:00 +00:00
ncurses Correct use_screen() and use_window() prototypes in curs_threads(3x). 2012-05-22 06:28:53 +00:00
netcat MFV: netcat from OpenBSD 5.2. 2012-10-22 18:56:31 +00:00
ngatm mdoc: consistently spell our email addresses <foo@FreeBSD.org> 2010-05-24 06:26:38 +00:00
ntp Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
nvi Fix two instances of undefined behaviour in contrib/nvi. 2013-02-16 12:48:06 +00:00
ofed - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00
one-true-awk MFV: one-true-awk 20121220. 2013-01-03 07:25:30 +00:00
openbsm Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
openpam OpenPAM Micrampelis was re-rolled due to a showstopper bug. 2012-05-26 23:10:21 +00:00
openresolv According to resolvconf.conf(5) manpage and sources, there is no 2012-08-21 06:14:08 +00:00
opie In contrib/opie/opiekey.c, use the correct length to zero the secret. 2013-02-16 12:45:57 +00:00
pam_modules/pam_passwdqc
pf o Create directory sys/netpfil, where all packet filters should 2012-09-14 11:51:49 +00:00
pnpinfo In contrib/pnpinfo/pnpinfo.c, remove an extraneous parameter from the 2011-12-17 23:43:40 +00:00
sendmail Merge sendmail 8.14.6 errata issue 2013-02-18 19:33:07 +00:00
smbfs Bump .Dd date for previous revision. 2011-09-17 22:53:05 +00:00
tcp_wrappers Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
tcpdump Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
tcsh Update to tcsh 6.18.01. 2012-02-22 03:36:15 +00:00
telnet Make sure that each va_start has one and only one matching va_end, 2012-09-28 07:51:30 +00:00
texinfo Fix stack smash problem in makeinfo, by increasing buffer sizes in 2011-05-03 14:43:16 +00:00
tnftp Move determination of socket buffer sizes from startup to the first time a 2012-03-10 11:25:53 +00:00
top Bump MAX_COLS to 512 to take advantage of wider terminals. 2012-12-13 06:45:45 +00:00
traceroute mdocify and update the traceroute(8) manual page. 2012-06-27 07:41:21 +00:00
tzcode - set progname for use in usage() 2011-12-08 02:40:46 +00:00
tzdata Merge of vendor import of 242999, tzdata2012j 2012-11-13 21:10:50 +00:00
wpa Import change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa: 2013-02-16 12:52:40 +00:00
xz MFV r244559: 2012-12-22 21:32:12 +00:00