MFC r268000:

Make sure to always clear p_fd for process getting rid of its filetable.

Filetable can be shared with other processes. Previous code failed to
clear the pointer for all but the last process getting rid of the table.
This is mostly cosmetics.

Get rid of 'This should happen earlier' comment. Clearing the pointer in
this place is fine as consumers can reliably check for files availability
by inspecting fd_refcnt and vnodes availabity by NULL-checking them.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268001:
Make fdunshare accept only td parameter.

Proc had to match the thread anyway and 2 parameters were inconsistent
with the rest.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFH: r264781, r267669, r267670

Simplify reading pw.conf(5) by using getline(3)

Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1]
Fix some broken indentattion [1]

Fix changing the username [2]

PR:		189172 [1], 189173 [2]
Submitted by:	fullermd@over-yonder.net [1][2]


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268002:

Call fdcloseexec right after fdunshare.

No functional changes.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC	r267745, r268268:
getopt(3): recognize option:: as GNU extension for "optional options".

Also ANSIfy a function declaration.

While here update the OpenBSD patch level in getopt_long.c as we
already have the corresponding change.

Obtained from:	NetBSD
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 267756:

Merge intermediate OpenBSD v1.25 changes (almost identical to ours)
to reduce diff and bump OpenBSD patch level to v1.26.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
267622 Log:
  Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
  Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
  syscons(4) and vt(4) can be built together now.
267625 Log:
  Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
  Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
  Use a common tunable to choose between vt(4)/sc(4)
  With this change and previous work from ray@ it will be possible to put
  both in GENERIC, and have one enabled by default, but allow the other to
  be selected via the loader.
  (The previous implementation had separate kern.vt.disable and
  hw.syscons.disable tunables, and would panic if both drivers were
  compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
  Fix vt(4) detection in kbdcontrol and vidcontrol
  As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
  of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
  Reported by:  Trond Endrestøl
268045 by emaste@ Log:
  Add vt(4) to GENERIC and retire the separate VT config
  vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
  driver, set the loader tunable kern.vty=vt .

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268049:
Fix ifconfig to show pltime and vltime with -L option,
again after usage change from time_second to time_uptime.

PR:		188520
Submitted by:	Guy Yur <guyyur__at__gmail.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC of r263873.

Pointed by:     Ivan Klymenko <fidaj@ukr.net>

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Temporary disable build of vt_efifb vt(4) driver, not all parts of UEFI support
here yet.
This direct commit to STABLE-10, because HEAD already support UEFI FB.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268089:
  Linux uses its own UUID for data partitions.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268090:
  Document all aliases supported by GEOM_PART class.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268059: Add missing VT_ kernel config knobs


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268393: [mdoc] Fix previous.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r268022: Rename the WITHOUT_VT_SUPPORT knob to WITHOUT_VT

  The _SUPPORT knobs have a consistent meaning which differs from the
  behaviour controlled by this knob.  As the knob is opt-out and has not
  appeared in a release the impact should be low.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Regen src.conf(5) after r268399


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document r268161, mkimg(1) merged to stable/10.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document r268091, disklabel64 partition scheme.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix kernel memory disclosure in control message and SCTP notifications.

Security:	FreeBSD-SA-14:17.kmem
Security:	CVE-2014-3952, CVE-2014-3953


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document FreeBSD-SA-14:17.kmem

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@268439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f