MFC r258148,r258149,r258150,r258152,r258153,r258154,r258181,r258182:

r258148:

Add a note that this file is compiled as part of the kernel and libc.

Requested by:	kib

r258149:

Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

r258150:

Sync return value with actual implementation.

r258151:

Style.

r258152:

Precisely document capability rights here too (they are already documented
in rights(4)).

r258153:

The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

r258154:

- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
  in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
  CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
  that as all moved rights are not used yet.

r258181:

Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:

	CAP_EVENT - when set on descriptor, the descriptor can be monitored
		with syscalls like select(2), poll(2), kevent(2).

	CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
		syscall can be called on this kqueue to with the eventlist
		argument set to non-NULL value; in other words the given
		kqueue descriptor can be used to monitor other descriptors.
	CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
		syscall can be called on this kqueue to with the changelist
		argument set to non-NULL value; in other words it allows to
		modify events monitored with the given kqueue descriptor.

Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.

Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.

r258182:

Correct right names.

Sponsored by:	The FreeBSD Foundation
Approved by:	re (kib)
Pre-zero the MAC context.

Security:	CVE-2013-4548
Security:	FreeBSD-SA-13:14.openssh
Approved by:	re (implicit)
MFC r257874:

Fix extattr(2) MLINKS.

Approved by:	re (kib)
MFH (r257954): upgrade to OpenSSH 6.4p1

Approved by:	re (kib)
MFC: 257695

- Fix link loss on vlan reconfiguration.
- Fix issues with 'vlanhwfilter'.

Approved by:	re (glebius)
MFC r256557: add uname flags to access userland's __FreeBSD_version more
conveniently than the traditional way of scripts parsing #include files.

Approved by:	re (hrs)
MFC r258254 - teach iconv about a WCHAR_T pseudo-type

Approved by:	re (kib)
MFC r258283 - move iconv* symbols out of libc.so.7 namespace with
compatibility symbols to aid transition for existing 10.x installs.

Approved by:	re (kib)
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
r258319, r258320:

r258305:
  Use the IMAGES variable to determine which image files to remove
  as part of 'make -C /usr/src/release clean'.

r258307:
  Add a script and configuration files to fetch pre-built packages
  from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).

r258308:
  Unconditionally copy the build host /etc/resolv.conf into
  the chroot directory, since hostname resolution may be
  needed in the case of building a dvd image (with packages)
  and also setting 'NOPORTS=1'.

r258309:
  Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
  in preparation of adding a 'dvd1.iso' target.

r258310:
  Add the 'dvd1.iso' target.  This mimics the 'release.iso' target,
  with the additional step of fetching packages for inclusion on the
  dvd image.

  The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
  the '${TARGET}/pkg-stage.conf' configuration file exists (currently
  only amd64 and i386).

  Allow dvd1.iso to be skipped if NODVD=1.

r258314:
  Fix how ABI is evaluated so it matches more than a dot-zero
  case.

r258317:
  Document the 'dvdrom' target.

r258319:
  Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.

r258320:
  Simplify PKG_ABI for pkg-stage.sh.

Approved by:	re (hrs)
Sponsored by:	The FreeBSD Foundation
MFC r257755-257756,257780-257785,257787-257793, and
257795,257817,257819,257937-257938,258029,258263-258267:
257755: SRV records
257756: fix spurious error message
257780: Whitespace
257781: Comments and funny syntax
257782: Debug file truncation is optional
257783: f_show_err for debugging
257784: f_eval_catch for debugging
257785: fix size calculations bug
257787: fix broken HTTP "any" media type
257788: more debugging
257789: Comments
257790: fix printf usage bug
257791: f_[v]sprintf added
257792: Comments
257793: fix off-by-one error in size calcs
257795: Replace pkg-tools with pkgng
257817: fix cosmetic typos
257819: Use `pkg -vv' to get ABI
257937: Adjustment to last
257938: Adjustment to last
258029: Comments
258263: Shuffle code around
258264: Remove unused code
258265: Debugging. Use f_eval_catch with pkg
258266: Shutdown media on exit from packages
258267: Fix pkg install from DVD

Reviewed by:	many
Discussed on:	-current
Approved by:	re (hrs)
MFC Revisions:
256549: man-page updates
256551: .Dd bump in manpage
256553: bootenv -> ROOT fix
257842: monster list of fixes
257843: minor touchup
257844: copy install log
257845: fixup to last
257872: mdoc fixup
257939: debug check
258021: MBR bootcode fixup

Reviewed by:	many
Discussed on:	-current
Approved by:	re (hrs)