15066 Commits

Author SHA1 Message Date
jamie
aeea68e0cf MFC r298888: typo
Submitted by:	Jimmy Olgeni
2016-05-01 16:49:32 +00:00
wblock
8ed4b37d5a MFC r298525:
Add a single example of adding a user that roughly corresponds with the
adduser example in the Handbook.
2016-04-30 14:47:45 +00:00
jamie
7552516031 MFC r298584:
Note the existence of module-specific jail paramters, starting with the
  linux.* parameters when linux emulation is loaded.

MFC r298585:

  Encapsulate SYSV IPC objects in jails.  Define per-module parameters
  sysvmsg, sysvsem, and sysvshm, with the following bahavior:

  inherit: allow full access to the IPC primitives.  This is the same as
  the current setup with allow.sysvipc is on.  Jails and the base system
  can see (and moduly) each other's objects, which is generally considered
  a bad thing (though may be useful in some circumstances).

  disable: all no access, same as the current setup with allow.sysvipc off.

  new: A jail may see use the IPC objects that it has created.  It also
  gets its own IPC key namespace, so different jails may have their own
  objects using the same key value.  The parent jail (or base system) can
  see the jail's IPC objects, but not its keys.

PR:		48471
2016-04-30 04:02:32 +00:00
jamie
1d5d3749a4 MFC r298562:
Make jail(8) interpret escape codes in fstab the same as getfsent(3).

PR:		208663
2016-04-28 01:40:47 +00:00
jhb
fb3b480b1b MFC 297932,298295:
Improvements for PCI passthru devices.

297932:
Handle PBA that shares a page with MSI-X table for passthrough devices.

If the PBA shares a page with the MSI-X table, map the shared page via
/dev/mem and emulate accesses to the portion of the PBA in the shared
page by accessing the mapped page.

298295:
Always emit an error message on passthru configuration errors.

Previously, many errors (such as the PCI device not being attached
to the ppt(4) driver) resulted in bhyve silently exiting without
starting the virtual machine.  Now any errors encountered when
configuring a virtual slot for a PCI passthru device should be noted
on stderr.
2016-04-27 23:04:42 +00:00
bcr
171ba3a9b3 MFC r298524:
Define which of the username options (-u/-U) to jexec(8) is the default.
Bump Dd.

PR:		207587
Submitted by:	dewayne@heuristicsystems.com.au
Sponsored by:   Essen Hackathon 2016
2016-04-27 16:23:16 +00:00
delphij
392e7b9479 MFC r298695: MFV r298691: ntp 4.2.8p7.
Security:	CVE-2016-1547, CVE-2016-1548, CVE-2016-1549, CVE-2016-1550
Security:	CVE-2016-1551, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518
Security:	CVE-2016-2519
Security:	FreeBSD-SA-16:16.ntp
With hat:	so
2016-04-27 15:24:33 +00:00
bapt
7b928e00e5 MFC: r298111 r298114
Directly set the O_CLOEXEC flags via the open(2) attributes
  Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
calling fcntl(2)

Sponsored by:	Essen Hackathon
2016-04-23 10:06:57 +00:00
emaste
c5bc872f5c MFC r288490: Add debug file extension to kldxref(8)
After r288176 [in head] kernel debug files have the extension .debug.
  They also moved [in head] to /usr/lib/debug/boot/kernel by default so
  in the normal case kldxref does not encounter them.  A src.conf(5)
  setting may be used to continue installing them in /boot/kernel
  though, so have kldxref skip .debug files in addition to .symbols
  files.

Merged this change to avoid warnings when a stable/10 kldxref runs
against a head install, perhaps on an upgrade to 11-CURRENT.  The change
to kernel debug files will not be merged to stable/10.
2016-04-22 21:43:44 +00:00
emaste
6ac493037a MFC r277205 (imp):
Reserve and ignore the a new module metadata type MDT_PNP_INFO for
  associating an optional PNP hint table with this module. In the
  future, when these are added, these changes will silently ignore the
  new type they would otherwise warn about. It will always be safe to
  ignore this data. Get this into the builds today for some future
  proofing.
2016-04-22 21:38:37 +00:00
emaste
e060611a41 MFC r275940 (imp): Bump the largest record we can cope with from 1k to 8k.
Other users of the hints file don't have any real limits, and longer
records will need to be written shortly.
2016-04-22 21:33:11 +00:00
wblock
b1bc0c99b3 MFC r298005:
Remove a link to the CTM section of the Handbook, which no longer exists.
2016-04-21 14:25:45 +00:00
emaste
c730fb273c MFC r296926: kbdcontrol: add -P path option to add keymap search paths
PR:		193865
Sponsored by:	The FreeBSD Foundation
2016-04-19 20:56:02 +00:00
asomers
336b1f7bb6 MFC r294924
syslogd: Enable repeated line compression for lines of any length.

Enable repeated line compression for lines of any length, instead of only short
lines. AFAICT repeated line compression was limited to short lines as a RAM
optimization, which made sense when karels added it in 1988, but no longer.
The penalty is a paltry 904B of RAM per file logged.
2016-04-08 21:42:35 +00:00
sbruno
48324f1236 MFC 290102
- Include usr.sbin/mpsutil for management of mps(4) and mpr(4) utilities.

- Thanks to scottl and bapt for making this happen.

Submitted by:	bapt scottl
Reviewed by:	kbowling
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5529
2016-04-05 20:34:20 +00:00
wblock
1a029dfe24 MFC r297330:
Adjust misleading wording of the -G option and simplify a few
surrounding sentences.  From a discussion on -ports.
2016-04-04 16:20:46 +00:00
mav
eccbb81df1 MFC r296656:
Don't bother to invoke gmirror or zpool if the module is not loaded.
2016-03-28 09:36:52 +00:00
mav
b7a1951487 MFC r296655, r296673, r296776: Unify and improve metadata wiping. 2016-03-28 09:35:29 +00:00
mav
90b4836519 MFC r296654: Use geom disk list instead camcontrol identify.
The new way works for almost any disk, while the old only for ATA.
2016-03-28 09:34:14 +00:00
allanjude
95e874ef1f MFC: r296988
Remove 50% ZFS conditional from bsdinstall/zfsboot

Approved by:	re (marius)
2016-03-17 21:00:43 +00:00
asomers
a3cbd495a3 MFC r295900, r295768 to usr.sbin/iostat
r295768 | asomers | 2016-02-18 13:08:01 -0700 (Thu, 18 Feb 2016) | 14 lines

Fix compiler warnings in iostat

Raise WARNS from 1 to 6 (the default)
Fix warnings:
* Use C99 designated initializers for structs, and initialize all fields
* Mark global variables as static
* Mark unused function arguments
* Be careful about signed/unsigned comparisons

r295900 | asomers | 2016-02-22 14:40:53 -0700 (Mon, 22 Feb 2016) | 10 lines

Fix the usr.sbin/iostat build with GCC, broken by r295768

Renamed some local variables for compatibility with -Wshadow
2016-03-17 20:29:10 +00:00
asomers
897095a018 MFC r293229, r293833 to usr.sbin/rpcbind
r293833 | asomers | 2016-01-13 10:33:50 -0700 (Wed, 13 Jan 2016) | 16 lines

Fix Coverity warnings regarding r293229

rpcbind/check_bound.c
        Fix CID1347798, a memory leak in mergeaddr.

rpcbind/tests/addrmerge_test.c
        Fix CID1347800 through CID1347803, memory leaks in ATF tests.  They
        are harmless because each ATF test case runs in its own process, but
        they are trivial to fix.  Fix a few other leaks that Coverity didn't
        detect, too.

r293229 | asomers | 2016-01-05 17:00:11 -0700 (Tue, 05 Jan 2016) | 36 lines

"source routing" in rpcbind

Fix a bug in rpcbind for multihomed hosts. If the server had interfaces on
two separate subnets, and a client on the first subnet contacted rpcbind at
the address on the second subnet, rpcbind would advertise addresses on the
first subnet. This is a bug, because it should prefer to advertise the
address where it was contacted. The requested service might be firewalled
off from the address on the first subnet, for example.

usr.sbin/rpcbind/check_bound.c
        If the address on which a request was received is known, pass that
        to addrmerge as the clnt_uaddr parameter. That is what addrmerge's
        comment indicates the parameter is supposed to mean. The previous
        behavior is that clnt_uaddr would contain the address from which the
        client sent the request.

usr.sbin/rpcbind/util.c
        Modify addrmerge to prefer to use an IP that is equal to clnt_uaddr,
        if one is found. Refactor the relevant portion of the function for
        clarity, and to reduce the number of ifdefs.

etc/mtree/BSD.tests.dist
usr.sbin/rpcbind/tests/Makefile
usr.sbin/rpcbind/tests/addrmerge_test.c
        Add unit tests for usr.sbin/rpcbind/util.c:addrmerge.

usr.sbin/rpcbind/check_bound.c
usr.sbin/rpcbind/rpcbind.h
usr.sbin/rpcbind/util.c
        Constify some function arguments
2016-03-17 20:00:49 +00:00
ngie
d3df3b00de MFC r294891:
Require /sbin/mount_cd9660 when running the cd9660 tests

In some cases the test system might not have mount_cd9660(8). Don't
implicitly rely on it while testing cd9660 support; explicitly rely
on it
2016-03-13 01:20:20 +00:00
jgh
46f91bf277 MFC 296280:
PR:		202971
Submitted by:	adamw@FreeBSD.org
Reviewed by:	bdrewery@
Approved by:	wblock@
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5429
2016-03-11 01:39:28 +00:00
pfg
1c6432f96a MFC r295672:
crontab: ftruncate() with ftello() instead of ftell().

Obtained from:	OpenBSD (CVS rev. 1.47)
2016-03-07 16:18:52 +00:00
pfg
b970e68474 MFC r295671:
cron: use (char *)NULL instead of (char *)0 in execle.

Obtained from:	OpenBSD (CVS Rev 1.25)
2016-03-07 16:12:04 +00:00
mav
4ed2206585 MFC r295562: Don't check CmdSN for initial login request.
This fixes connection errors for some initiators not starting CmdSN
from zero.

While there, fix wrong status details reported for couple errors.
2016-03-07 08:59:06 +00:00
dwmalone
241b0e18f1 MFC:
r295924: Make sure that hash-based db files fsync befor closing/syncing.
r295925: We no longer need O_SYNC pwd_mkd
r295465: We no longer need O_SYNC on services_mkdb
r295800: We no longer need O_SYNC on cap_mkdb

This should improve the performance of building db files.
2016-03-06 08:40:21 +00:00
araujo
b357db3ca6 MFH: 285685
Add support to the jail framework to be able to mount linsysfs(5) and linprocfs(5).

PR:		207179
Requested by:	thomas@gibfest.dk
Reviewed by:	jamie, bapt
Approved by:	re (gjb)
Sponsored by:	gandi.net
Differential Revision:	https://reviews.freebsd.org/D5390
2016-02-24 02:34:11 +00:00
markj
59f8276e61 MFC r295737:
Use the _SAFE loop variant.

PR:		207146
Approved by:	re (gjb, glebius)
2016-02-22 20:20:10 +00:00
des
b5c4e6d861 MFH (r295535): use insecure-lan-zones option instead of hardcoded list
Approved by:	re (glebius)
Relnotes:	yes
2016-02-17 11:38:43 +00:00
des
259061d27e MFH (r295533): remove broken unbound-control-setup script
Approved by:	re (glebius)
Relnotes:	yes
2016-02-17 11:36:45 +00:00
jhb
b92c9d3353 MFC 295174:
- Note that devctl(8) will appear in 10.3 first.
- Add missing devctl_set_driver entry to namelist in devlist(3).

Approved by:	re (gjb)
2016-02-11 17:55:17 +00:00
allanjude
5c35f05097 MFC: r295074
The zfsboot (zfs auto mode) part of bsdinstall now supports UEFI

Approved by:	re (marius)
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
2016-02-04 15:46:12 +00:00
jhb
05de7f1543 MFC 278320,278336,278830,285621:
Add devctl(8): a utility for manipulating new-bus devices.  Note that
this version does not include the 'suspend' and 'resume' commands
present in HEAD as those depend on larger changes to the suspend and
resume code in the kernel.

278320:
Add a new device control utility for new-bus devices called devctl.  This
allows the user to request administrative changes to individual devices
such as attach or detaching drivers or disabling and re-enabling devices.
- Add a new /dev/devctl2 character device which uses ioctls for device
  requests.  The ioctls use a common 'struct devreq' which is somewhat
  similar to 'struct ifreq'.
- The ioctls identify the device to operate on via a string.  This
  string can either by the device's name, or it can be a bus-specific
  address.  (For unattached devices, a bus address is the only way to
  locate a device.)  Bus drivers register an eventhandler to claim
  unrecognized device names that the driver recognizes as a valid address.
  Two buses currently support addresses: ACPI recognizes any device
  in the ACPI namespace via its full path starting with "\" and
  the PCI bus driver recognizes an address specification of
  'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector
  strings supported by pciconf).
- To make it easier to cut and paste, change the PnP location string
  in the PCI bus driver to output a full PCI selector string rather
  than 'slot=<slot> function=<func>'.
- Add a devctl(3) interface in libdevctl which provides a wrapper around
  the ioctls and is the preferred interface for other userland code.
- Add a devctl(8) program which is a simple wrapper around the requests
  supported by devctl(3).
- Add a resource_unset_value() function that can be used to remove a
  hint from the kernel environment.  This is used to clear a
  hint.<driver>.<unit>.disabled hint when re-enabling a boot-time
  disabled device.

278336:
Unbreak the build (memchr is explicitly required by devctl(9) after r278320)

278830:
install the man page...

285621:
Fix formatting.

Approved by:	re (marius)
2016-02-01 23:07:31 +00:00
grehan
83c1d10f0c MFC r284539, r284630, r284688, r284877, r285217, r285218,
r286837, r286838, r288470, r288522, r288524, r288826,
    r289001

Pull in bhyve bug fixes and changes to allow UEFI booting.
This provides Windows support.

Tested on Intel and AMD with:
  - Arch Linux i386+amd64 (kernel 4.3.3)
  - Ubuntu 15.10 server 64-bit
  - FreeBSD-CURRENT/amd64 20160127 snap
  - FreeBSD 10.2 i386+amd64
  - OpenBSD 5.8 i386+amd64
  - SmartOS latest
  - Windows 10 build 1511'

Huge thanks to Yamagi Burmeister who submitted the patch
and did the majority of the testing.

r284539 - bootrom mem allocation support
r284630 - Add SO_REUSEADDR when starting debug port
r284688 - Fix a regression in "movs" emulation
r284877 - verify_gla() non-zero segment base fix
r285217 - Always assert DCD and DSR in the uart
r285218 - devmem nodes moved to /dev/vmm.io/
r286837 - Add define for SATA Check-Power-Mode
r286838 - Add simple (no-op) SATA cmd emulations
r288470 - Increase virtio-blk indirect descs
r288522 - Firmware guest query interface
r288524 - Fix post-test typo
r288826 - Clean up SATA unimplemented cmd msg
r289001 - Add -l option to specify userboot path

Submitted by:	Yamagi Burmeister
Approved by:	re (kib)
2016-02-01 14:56:11 +00:00
dteske
6cd3ba3ca2 MFC 293617,294669: Minor fixes
r293617: Fix improper duration for f_dialog_pause() API
r294669: Fix a typo in a comment
2016-01-27 06:38:03 +00:00
brueffer
d5746feb7b MFH: r293745
Add a basic bhyvectl manpage.
2016-01-26 09:50:36 +00:00
des
77b200a2d8 MFH (r275765): add a vigr(8) tool to mirror vipw(8) 2016-01-26 09:09:20 +00:00
vangyzen
78461d0975 MFC r293860
bsdinstall: Suggest the GPT+Active workaround on Dell T5810

The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Relnotes:   We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:   Dell Inc.
2016-01-24 02:10:05 +00:00
allanjude
339b899e2c MFC: r285732
Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround

MFC: r287843
  Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list

Sponsored by:	ScaleEngine Inc.
2016-01-23 22:13:31 +00:00
delphij
0e1dba9a0a MFC r294554: MFV r294491: ntp 4.2.8p6.
Security:	CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security:	CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security:	CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security:	CVE-2015-8140, CVE-2015-8158
With hat:	so
2016-01-22 15:55:21 +00:00
jamie
edc9e0e402 MFC r294183:
Clear errno before calling getpw*.

MFC r294196:

  Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
  handled by ifconfig, and it was doing it wrong when the paramater included
  extra ifconfig options.

PR:		205926
2016-01-21 04:37:16 +00:00
allanjude
c599610d3a MFC: r294191
Never 4k align the MBR bootpool because zfsldr can not deal with a gap

Sponsored by:	ScaleEngine Inc.
2016-01-21 01:15:40 +00:00
ian
2651e6b1c6 MFC r292337, r292552, r292553:
Build mount_smbfs for arm.  Also sort the subdirs.

  Avoid unaligned memory accesses when encoding netbios names in libsmb.

  The current code for encoding a netbios name converts each byte to a 16-bit
  value and stores the result by casting a char* to u_short*, resulting in
  alignment faults on strict-alignment platforms.

  This change reimplements the encoding routine using only byte accesses to
  memory. There is no particular reason to work with 16-bit values just
  because the encoding process creates two bytes of output for every byte of
  input. Working a byte at at time also avoids endian problems for big-endian
  platforms.

  Make the building of libsmb and mount_smbfs unconditional, now that r292552
  has eliminated alignment and endian problems that were making it fail on
  some platforms.

PR:           180438
PR:           189415
Relnotes:	Yes
2016-01-19 23:36:49 +00:00
jhb
8aa68d7858 MFC 292410,292443,293977:
Exit cleanly if malloc() fails to allocate a buffer for a copy of the
current MBR.

PR:		205322
Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>
2016-01-19 19:04:56 +00:00
gnn
ba5e3d1893 MFC: 293459,293643
Add netmap support for bhyve
2016-01-18 21:24:28 +00:00
jhb
e8ea29ce3a MFC 291225:
Add a new -B flag for use with list mode (-l) that lists details about
bridges.  Currently this includes information about what resources a
bridge decodes on the upstream side for use by downstream devices including
bus numbers, I/O port resources, and memory resources.  Windows and bus
ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.

To simplify the implementation, all enumeration is done by reading the
appropriate config space registers directly rather than querying the
bridge driver in the kernel via new ioctls.  This does result in a few
limitations.

First, an unimplemented window in a PCI-PCI bridge cannot be accurately
detected as accurate detection requires writing to the window base
register.  That is not safe for pciconf(8).  Instead, this assumes that
any window where both the base and limit read as all zeroes is
unimplemented.

Second, the PCI-PCI bridge driver in a tree has a few quirks for
PCI-PCI bridges that use subtractive decoding but do not indicate that
via the progif config register.  The list of quirks is duplicated in
pciconf's source.
2016-01-18 19:52:20 +00:00
melifaro
db8f77905b MFC r288297 (userland part).
If ever MFC is done for the new lltable code, this change will miminise
ABI breakage.

rtsock requests for deleting interface address lles started to return EPERM
  instead of old "ignore-and-return 0" in r287789. This broke arp -da /
  ndp -cn behavior (they exit on rtsock command failure). Fix this by
  translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and
  making arp/ndp ignore these entries in batched delete.
2016-01-17 06:02:59 +00:00
jpaetzel
f7e7eb71be MFC 293305
Allow /etc/exports to contain usernames/groups with spaces in them.

If you are getting your users/groups from a directory service such
as LDAP or AD it's possible for those usernames or groupnames to
contain spaces.

Submitted by:	Sean E. Fagan
Reviewed by:	rmacklem
Sponsored by:	iXsystems
2016-01-16 01:40:46 +00:00