Commit Graph

18877 Commits

Author SHA1 Message Date
Robert Wing
4f4065e0a2 libvmm: clean up vmmapi.h
struct checkpoint_op, enum checkpoint_opcodes, and
MAX_SNAPSHOT_VMNAME are not vmm specific, move them out of the vmmapi
header.

They are used for the save/restore functionality that bhyve(8)
provides and are better suited in usr.sbin/bhyve/snapshot.h

Since bhyvectl(8) requires these, the Makefile for bhyvectl has been
modified to include usr.sbin/bhyve/snapshot.h

Reviewed by:    kevans, grehan
Differential Revision:  https://reviews.freebsd.org/D28410
2021-02-17 17:46:42 -09:00
Robert Wing
63640b2f55 automount(8): fix absolute path when creating a mountpoint
When executing automount(8), it will attempt to create the directory where an
autofs filesystem is to be mounted. Explicity set the root path for this
directory to "/".

This fixes the issue where the directory being created was being treated as a
relative path instead of an absolute path (as expected).

PR:     224601
Reported by:    kusumi.tomohiro@gmail.com
Reviewed by:    trasz
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27832
2021-02-17 01:02:56 -09:00
Kyle Evans
6fea22cebe fmtree: add a deprecation notice to the manpage
Note that this mtree(8) is actually installed as fmtree(8), while
mtree(8) is located in ^/contrib/mtree -- thus, the reference to
mtree(8) makes a lot more sense in the context in which folks would
actually notice it. Shout-out to Ravi for pointing out that this may
not be an obvious fact.

MFC after:	3 days
Reviewed by:	bdrewery, brooks, cy, emaste
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D28573
2021-02-12 23:15:58 -06:00
Kyle Evans
1253835121 inetd: fix unix sockaddr's length assignment
unsz was always exactly '1' here due to an unfortunate mispositioning
of closing parenthesis. While it's generally irrelevant because bind(2)
is passed the (accurate) sep->se_ctrladdr_size instead, it's not very
helpful for anything locally that wants to use it rather than assuming
that sep->se_ctrladdr_size perfectly fits the end of sun_path.

Just drop unsz entirely and use the result of SUN_LEN() for it.

MFC-after:	3 days
2021-02-12 13:36:38 -06:00
Kyle Evans
b2c4ca8d28 pkg(7): address minor nits (mostly clang-analyze complaints)
- One (1) spurious whitespace.
- One (1) occurrence of "random(3) bad, arc4random(3)" good.
- Three (3) writes that will never be seen.

The latter two points are complaints from clang-analyze. Switching to
arc4random(3) is decidedly a good idea because we weren't doing any kind
of PRNG seeding anyways. The discarded assignments are arguably good
for future-proofing, but it's better to improve the S/N ratio from
clang-analyze.

Reviewed by:	bapt, manu
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28525
2021-02-11 18:58:27 -06:00
Kyle Evans
18418e1936 pkg(7): add an -r reponame option for bootstrap and add
This is limited to bootstrap/add because some real pkg(8) commands
have -r flags with an incompatible meaning/usage, e.g., pkg-audit.
pkg(7) will still commence the search as it has, but it will ignore any
repo objects without the given name so that overrides and whatnot still
work as expected.

The use of it for add is noted in the manpage; notably, that the
signature config for that repository will be used over global config if
it's specified. i.e., pkg(7) should assume that the given pkg did come
from that repository and treat it appropriately.

Reviewed by:	bapt, manu
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28524
2021-02-11 18:58:26 -06:00
Warner Losh
7fe2f504f8 efibootmgr: Check for efi supported after parsing args
Move the check for efi variables being supported to after parsing the args. This
allows '-h' to produce both as a normal user as well as on all systems.
2021-02-11 16:09:51 -07:00
Alex Richardson
12ad8bdb34 usr.sbin/makefs: fix use-after-free in read_mtree_keywords()
The st variable is used as a shortcut for &node->inode->st, but in one
branch just before the exit we update node->inode without changing st.

Reported by:	AddressSanitizer
Reviewed By:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D28570
2021-02-10 15:24:25 +00:00
Cy Schubert
f44e67d120 MFV d60fa10fd8:
Update unbound 1.13.0 --> 1.13.1.

Includes numerous bugfixes documented at:
https://www.nlnetlabs.nl/projects/unbound/download/#unbound-1-13-1

MFC after:	1 month
2021-02-09 20:27:25 -08:00
Mark Johnston
c7fcb36f56 binmiscctl: Avoid segfault with "binmiscctl add" and no extra params
MFC after:	1 week
2021-02-08 09:20:38 -05:00
Alexander Motin
92d0d6bb14 Print DeviceHandle and PhysicalId in hex.
The first is actually a bitfield.  The second is printed in hex by
dmidecode, so uniformidy should be good.

MFC after:	1 week
2021-02-05 16:15:53 -05:00
Alexander Motin
35e39fd95f Improve ACPI_NFIT_CONTROL_REGION formatting.
MFC after:	1 week
2021-02-05 10:08:34 -05:00
Konstantin Belousov
856789c123 cpucontrol(8): Fix display.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-02-05 03:22:26 +02:00
Alex Richardson
72692dfdfe usr.bin/jail: Fix tests when using kyua -v parallelism=N
These tests create jails with the same name, so they cannot be run in
parallel.

Reviewed By:	lwhsu
Differential Revision: https://reviews.freebsd.org/D28482
2021-02-04 17:56:55 +00:00
Alex Richardson
7791ecf04b usr.sbin/praudit: Fix tests after 5619d49e07
Commit 5619d49e07 made the getgrgid() call inside bsm work as
intended so we now print "wheel" instead of a numeric 0 in the rgid field.

Reviewed By:	markj
Differential Revision: https://reviews.freebsd.org/D28462
2021-02-03 16:02:46 +00:00
John Baldwin
bcaa6aa153 config: Fix typo in comment. 2021-02-01 13:13:36 -08:00
Xin LI
07d218f70c Now that the portsnap buildbox is generating the raw bits for INDEX-14,
add it to the set of INDEX files built by portsnap.

Switch to INDEX-14 for main.
2021-01-28 23:26:14 -08:00
Alex Richardson
9a0a48b12d usr.sbin/pkg: Don't re-define roundup2
The file already includes sys/param.h and should use that definition.
I found this while testing D28332.

Reviewed By:	bapt
Differential Revision: https://reviews.freebsd.org/D28331
2021-01-28 17:25:53 +00:00
Mitchell Horne
7b08a307e8 bsdinstall: riscv-specific tweaks
Make the installer more useful, by allowing it to create a bootable
installation. Also, enable the menu option for ZFS-on-root.

Like arm64, RISC-V boots by UEFI only, so arm64's partedit
implementation is renamed and shared among the two platforms.

Reviewed by:	gjb
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D28180
2021-01-27 19:29:42 -04:00
Mitchell Horne
676b7d077c bsdinstall: create /efi/boot directory in ESP
If the installer is creating a new ESP, then this directory will not
exist and the subsequent cp will fail silently. This is usually of no
consequence if /efi/freebsd/loader.efi is set up correctly.

Reviewed by:	imp
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D28176
2021-01-27 19:27:51 -04:00
Brooks Davis
bfc99943b0 ndis(4): remove as previous announced
nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't been
the case for ages and the driver has had no meaningful maintenance in
ages. It only supports Windows-XP era drivers.

Also remove:
 - ndis support from wpa_supplicant
 - ndiscvt(8)

Reviewed By:	emaste, bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D27609
2021-01-25 21:45:03 +00:00
Alexander Motin
1b109c69ed Decode NFIT Platform Capabilities.
MFC after:	1 week
2021-01-25 16:08:06 -05:00
Ed Maste
25611bc0ab cxgbetool: correct utilties typo 2021-01-24 10:21:53 -05:00
Kyle Evans
123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Allan Jude
e6d795d154 Fix manpage markup in 2c8bb126de 2021-01-21 20:32:15 +00:00
Allan Jude
2c8bb126de bhyve: Add missing man page section on the nodelete block-device-option
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D28272
2021-01-21 20:30:55 +00:00
Alex Richardson
db4b5a16a3 Minor simplification of MK_PMC case in usr.sbin/Makefile
MK_PMC is already guarded by MK_CXX in src.opts.mk, so we can actually
merge it with the following SUBDIR statement after c1a3d7f206.

Suggested By:	jrtc27
2021-01-20 09:52:58 +00:00
Alex Richardson
c1a3d7f206 Remove remaining uses of ${COMPILER_FEATURES:Mc++11}
All supported compilers have C++11 support so these checks can be replaced
with MK_CXX guards.
See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252759

PR:		252759
Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28234
2021-01-19 21:37:36 +00:00
Peter Grehan
eed1cc6cdf Support COM3 and COM4 serial ports.
Submitted by: Jan Poctavek <janci@binaryparadise.com>, otis
Reviewed by: grehan (bhyve), imp, 0mp (manpages)
Differential Revision: https://reviews.freebsd.org/D28207
2021-01-20 03:30:22 +10:00
Conrad Meyer
ddf6115613 fstyp(8): fix exfat detection
In the presence of high-level errors (spec violations, bad boot blocks
checksum), report non-detection instead of detection.

PR:	252787 (related, but does not fully address)
2021-01-17 11:55:06 -08:00
Daniel Ebdrup Jensen
bce5d6aa24 service.8: Use entire section of literally displayed text
.Dl indents literal display text for one line, but .Bd can do it for a
whole subsection.

Pointy hat to:	debdrup
Reported by:	0mp
Reviewed by:	0mp
Differential Revision:	https://reviews.freebsd.org/D28198
2021-01-16 23:21:05 +01:00
Daniel Ebdrup Jensen
c6a112cf84 service.8: Provide example for adding completions to (t)csh
service(8) has an example for bash completion, however bash is third
party and in /usr/share/examples/csh/dot.cshrc is a working example for
csh.

Since I use (t)csh, I've tested it, and it works for me.

PR:		179497
Submitted by:	ohauer@

Reviewed by:	kp (tentatively)
Differential Revision:	https://reviews.freebsd.org/D28197
2021-01-16 22:05:29 +01:00
Mateusz Piotrowski
54c743e5b2 Fix a typo
"and" is not a flag.

MFC after:	3 days
2021-01-14 19:12:55 +01:00
Adrian Chadd
7c5a624afa [wpa] Add support for hostapd/wpa_supplicant when WITHOUT_CRYPT=YES
is enabled.

This builds wpa_supplicant / hostpad using internal encryption routines
rather than using libcrypt.

This has been supported in wpa for years now, however since we use
local makefiles for this, we bitrotted dependencies and configuration
options.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D27958
2021-01-12 16:43:19 -08:00
Ed Maste
a5584ace96 bsdconfig: correct utilties typo 2021-01-11 19:57:23 -05:00
Alexander V. Chernikov
0da3f8c98d Bump amount of queued packets in for unresolved ARP/NDP entries to 16.
Currently default behaviour is to keep only 1 packet per unresolved entry.
Ability to queue more than one packet was added 10 years ago, in r215207,
 though the default value was kep intact.

Things have changed since that time. Systems tend to initiate multiple
 connections at once for a variety of reasons.
For example, recent kern/252278 bug report describe happy-eyeball DNS
 behaviour sending multiple requests to the DNS server.

The primary driver for upper value for the queue length determination is
 memory consumption. Remote actors should not be able to easily exhaust
 local memory by sending packets to unresolved arp/ND entries.

For now, bump value to 16 packets, to match Darwin implementation.

The proper approach would be to switch the limit to calculate memory
 consumption instead of packet count and limit based on memory.

We should MFC this with a variation of D22447.

Reviewers: #manpages, #network, bz, emaste

Reviewed By: emaste, gbe(doc), jilles(doc)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D28068
2021-01-11 19:51:11 +00:00
Kyle Evans
8c4094f38c certctl: factor out certname resolution
create_blacklisted() will identify a cert whether it's provided a path to
a cert or the hash.serial format that is shown by `certctl list`.

Factor this logic out into a resolve_certname() so that it may be reused
elsewhere.
2021-01-08 22:36:22 -06:00
Kyle Evans
b799d38a2a certctl: replace hardcoded uses of /usr/local
Use the new user.localbase sysctl here as well, to reduce the number of
hardcoded localbase by one (1).

MFC after:	3 days (note: just use a literal /usr/local default)
2021-01-08 22:06:42 -06:00
Warner Losh
23e124c78b pccard: Remove bt3c(4) driver
pccard is being removed, so remove bt3c driver since it only has PC
Card attachment. Also remove bt3cfw(8) since it's the firmware for this
driver.

Relnotes: Yes
2021-01-07 20:40:41 -07:00
Mateusz Piotrowski
0199cbf641 Fix a typo
MFC after:	3 days
2021-01-07 15:28:29 +01:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
Alex Richardson
fe41c64b57 Fix -Wpointer-sign warnings in makefs and mkimg
Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27175
2021-01-07 09:26:21 +00:00
Fernando Apesteguía
439862883f gstat(8): Bump .Dd
Forgotten in cfaa2958dc

PR: 251313
Differential Revision: https://reviews.freebsd.org/D27815
2021-01-06 19:04:09 +01:00
Fernando Apesteguía
cfaa2958dc gstat(8): Document interactive keyboard commands
gstat(8) allows for <, >, c, f, F and q while in interactive mode.

PR:	251313
Submitted by:	bojan_petrovic@fastmail.fm
Approved by:	manpages (0mp@)
Differential Revision:	https://reviews.freebsd.org/D27815
2021-01-06 18:55:03 +01:00
Baptiste Daroussin
ae994fdc5b pkg(7): rework the arguments handling
Rework the arguments handling around using getopt_long:
* add long option support
* add -4 and -6 support to enforce ipv4 or ipv6

While here fix a regression which occured between FreeBSD 12.1 and
FreeBSD 12.2 where pkg bootstrap -y stopped working

PR:		252270
MFC after:	2 weeks
Submitted by:	evilham <contact@evilham.com>
Differential Revision:	https://reviews.freebsd.org/D27860
2021-01-06 11:47:34 +01:00
Alexander Motin
4d86ab429e Fix devinfo typo.
Submitted by:	Nick Wolff <darkfiberiru@gmail.com>
MFC after: 	1 week
Differential Revision:	https://reviews.freebsd.org/D27981
2021-01-05 14:56:23 -05:00
Andrew Turner
9fd96b416c Add the missing pmcstat log entries
Sponsored by:	Innovate UK
2021-01-05 10:03:05 +00:00
Emmanuel Vadot
a22cde7c02 pkgbase: Put ppp in it's own package
ppp uses libalias modules which now belong in the natd package.
Avoid bringing a dependancy on natd for the utilities package.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27711
2021-01-04 16:19:36 +01:00
Mariusz Zaborski
845b273728 bhyve: fix build without casper/capsicum support
Fix typo introduced in 966026246e.

Pointed out by:	jbeich
2021-01-03 18:17:04 +01:00
Mariusz Zaborski
966026246e bhyve: fix build without casper/capsicum support
PR:		252353
2021-01-03 17:21:28 +01:00