Commit Graph

19454 Commits

Author SHA1 Message Date
Ed Maste
6cd1bc5316 freebsd-update: restart sshd after upgrade
Sometimes the parent-child sshd protocol changes during an upgrade, and
when this happens sshd will not accept new connections until it is
restarted.

PR:		263489
Reviewed by:	kevans, gjb
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35109
2022-05-02 14:38:19 -04:00
Alfonso S. Siciliano
1ad9134e11
bsdinstall netconfig_ipv4: Fix resolv.conf rebuild
After an installation restart (for error or choice) dhclient does not
rebuild resolv.conf so `dialog --mixedform' of "Resolver Configuration"
in bsdinstall/scripts/netconfig draws empty forms. It causes a bad UX,
to see PR262262. Fixed resetting the interface before to run dhclient.

PR:			262262
Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35094
2022-04-30 17:34:53 +02:00
Alfonso S. Siciliano
9b4c606b96
bsdinstall/partedit: Fix UFS auto partitioning
Fix bsdinstall "Auto (UFS) Guided Disk Setup" and sade(8) "Auto".
The problem is a string comparison failure, it arose during the
dialog(3)/bsddialog(3) form conversion:

 * dialog uses only form.text while bsdialog differentiates between
   form.init and form.value.
 * dialog always allocates memory for form values while bsddialog only
   when a button is pressed.

Reviewed by:		bapt
Differential Revision:	https://reviews.freebsd.org/D35033
2022-04-30 01:24:23 +02:00
Robert Wing
690b7ea081 bhyve/snapshot: ..back to SOCK_STREAM
Now that nvlist_send()/nvlist_recv() are being used, ditch the datagram
socket.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34863
2022-04-28 07:43:01 -08:00
Rick Macklem
350668eb09 rpc.tlsservd: Delete set but unused variable 2022-04-26 19:29:01 -07:00
Mateusz Piotrowski
460ad988a9 freebsd-update.8: Note availability of updates for ALPHA, BETA, and RC
While here, restructure the section about the binary updates
availability.

MFC after:	1 week
2022-04-22 14:37:14 +02:00
Mateusz Piotrowski
f69f064483 freebsd-update.8: Add --currently-running to synopsis
While here, sort flags in synopsis.

MFC after:	3 days
2022-04-22 13:57:11 +02:00
Alan Somers
1a7f22d9c2 ctlstat: add prometheus output
When invoked by inetd, ctlstat -P will now produce output suitable for
ingestion into Prometheus.

It's a drop-in replacement for https://github.com/Gandi/ctld_exporter,
except that it doesn't report the number of initiators per target, and
it does report time and dma_time.

MFC after:	2 weeks
Sponsored by:	Axcient
Relnotes:	yes
Reviewed by: 	bapt, bcr
Differential Revision: https://reviews.freebsd.org/D29901
2022-04-20 15:18:41 -06:00
Stefan Eßer
7a60e798fb rrenumd: remove a set-but-not-used variable 2022-04-20 17:02:24 +02:00
Gordon Bergling
b92667b302 inetd(8): Fix a typo in the manual page
- s/similarily/similarly/

MFC after:	3 days
2022-04-19 16:49:07 +02:00
Alan Somers
8c47d8f538 prometheus_sysctl_exporter: fix metric aliasing
When exporting sysctls to Prometheus, the exporter replaces "." with
"_".  This caused several metrics to alias, confusing the Prometheus
server.  Fix it by:

* Renaming the "tcp_log_bucket" UMA zone to "tcp_log_id_bucket".  Also,
  rename "tcp_log_node" to "tcp_log_id_node" for consistency.

* Not exporting sysctls with "(LEGACY)" in the description.  That is
  used by ZFS sysctls that have been replaced by others, many of which
  alias to the same Prometheus metric name (like "vfs.zfs.arc_max" and
  "vfs.zfs.arc.max").

PR:		259607
Reported by:	delphij
MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	delphij,rew,thj
Differential Revision: https://reviews.freebsd.org/D34952
2022-04-19 06:56:39 -06:00
John Baldwin
7b02c1e8c6 iscsi: Fetch limits based on a socket rather than assuming global limits.
cxgbei needs the ability to return different limits based on the
connection (e.g. if the connection is over a T5 adapter or a T6
adapter as well as factoring in the MTU).

This change plumbs through the changes in the ioctls without changing
any of the backends.  The limits callback passed to icl_register now
accepts a second socket argument which holds the integer file
descriptor.  To support ABI compatiblity for old binaries, the
callback should return "global" values if the socket fd is zero.

The CTL_ISCSI_LIMITS argument used with CTL_ISCSI by ctld(8) now
accepts the socket fd in a field that was previously part of a
reserved spare field.  Old binaries zero this request which results in
passing a socket fd of 0 to the limits callback.

The ISCSIDREQUEST ioctl no longer returns limits.  Instead, iscsid(8)
invokes a new ISCSIDLIMITS ioctl after establishing the connection via
connect(2).  For ABI compat, if the old ISCSIDREQUEST is invoked, the
global limits are still fetched (with a socket fd of 0) and returned.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34928
2022-04-18 12:53:28 -07:00
John Baldwin
f0df722733 iscsid: Push #ifdef ICL_KERNEL_PROXY into cap_ioctl_limits list.
This reduces duplication in the two lists and makes it clearer which
ioctls are needed in the ICL_KERNEL_PROXY case.

Reviewed by:	mav
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34927
2022-04-18 12:53:15 -07:00
Brooks Davis
a812a5cacb lpr: remove a.out binary detection
Since the first unattributed commit in 1981, lpr has attempted to
prevent users from printing executables (and in earlier versions
archives). Archive detection was lost in 1992 when lpr gained a
dependency on a.out.h. No corresponding support was added for ELF files
with the full transiation to ELF in 1998, but a.out support has been
dragged forward to and contaminated platforms that never supported
a.out.

While this feature isn't unuseful, preventing the printing of
a single file format we stopped producing ~20 years ago isn't worth
the costs (however minimal).

Reviewed by:	gad, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D34901
2022-04-15 20:04:41 +01:00
Navdeep Parhar
811a82d53a cxgbetool(8): User interface to round-robin queue selection via COP.
Queue "roundrobin" in a COP rule means the driver should select queues
for new tids in a round-robin manner.

Reviewed by:	jhb@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D34922
2022-04-14 15:54:13 -07:00
Cy Schubert
145330347f wpa: Remove extraneous slash (/)
Remove the trailing slash (/), indiciating continuation, from the last
line of SRCS. The next line is blank; this is a NOP.

MFC after:	3 days
2022-04-13 15:27:30 -07:00
Tom Jones
016bfb0a97 etcupdate: remove redundant diff3 flag
-A and -m select different output modes output modes for diff3. When
both flags are present gnu diff3 prefers -m, drop the extra -A flag in
etcupdate.

Reviewed by:	pstef, 0mp
MFC after:	3 days
Sponsored by:	Klara Inc
Differential Revision:	<https://reviews.freebsd.org/D###>
2022-04-13 16:05:32 +01:00
Alfonso S. Siciliano
94cb21cda6
tzsetup(8): Refactoring to delete dialog(3) code
Little refactoring to complete the conversion to bsddialog(3),
not functional changes:

 * Delete: remaining code for autosizing using BSDDIALOG_AUTOSIZE.
 * Add: constants to delete magical numbers and to avoid unclear
   returned values.
 * Delete: redundant 'conf.button.default_cancel=false', performed by
   bsddialog_initconf().
 * Add: a new function message_zoneinfo_file() to merge features.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34862
2022-04-12 00:38:40 +02:00
Brad Davis
be0d16b0b0 bsdinstall: filter out disks that are unavailable from the list of options in ZFS
Reviewed by:	allanjude, rew
Differential Revision:	https://reviews.freebsd.org/D34167
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-04-10 15:09:14 -06:00
Robert Wing
c79331a42c bhyve: use linker set for ipc commands
Reviewed by:	markj, jhb
Differential Revision:	https://reviews.freebsd.org/D34760
2022-04-09 18:46:00 -08:00
Gordon Bergling
c254580cc2 fstyp(8): Fix a typo in a source code comment
- s/Miscellanious/Miscellaneous/

MFC after:	3 days
2022-04-09 09:27:23 +02:00
Christian Weisgerber
81d1214e8a man pages: Fix typo
s/the the/the/

Approved by:	ygy (doc)
2022-04-07 14:58:13 +02:00
Ed Maste
c71ae91f19 vidcontrol: disable p, P, and H when vt(4) is in use
These options use the CONS_SCRSHOT ioctl to capture the contents of the
current console, which is not yet supported by vt(4).  Disable the
options when vt(4) is in use rather than emitting a possibly confusing
error message.

This change should be reverted if CONS_SCRSHOT is implemented for vt(4).

PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 20:26:43 -04:00
Ed Maste
1f4442f71f vidcontrol: be explicit that -p and -P are sc(4) only
PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 19:39:19 -04:00
Mark Johnston
b0aa20bec5 bhyve: validate e82545 checksum offset field
Reported by:	Mehdi Talbi, Synacktiv
2022-04-05 22:58:28 +00:00
Alfonso S. Siciliano
50e244964e
bsdinstall/partedit: Replace libdialog with libbsddialog
bsdinstall/partedit: Replace (LGPL) libdialog with (BSD-2-Clause)
libbsddialog. Rewrite diskeditor.c and rename diskmenu.c because
it uses an API for menu totally incompatible with libbsddialog.
This is a User Interface change everything else is unchanged.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34639
2022-04-04 02:05:00 +02:00
Mateusz Piotrowski
84733f2e96 pw.8: Do not specify full path to shell in examples
Providing a full path to a shell is discouraged in the description of
the -s flag. Let's follow the best practices in the examples.

MFC after:	1 week
2022-04-03 14:52:08 +02:00
Mateusz Piotrowski
5fce57dd12 efibootmgr: Use the hier(7) ESP mount point in examples
MFC after:	1 week
2022-04-03 14:52:07 +02:00
Jose Luis Duran
1a0bd2665a sysrc.8: Mention it requires chroot(8)
Option -R uses chroot(8). Mention it in the corresponding section.

MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D34630
2022-04-03 13:54:11 +02:00
Mateusz Piotrowski
5243e560f6 pw.8: Fix synopsis of NIS flags
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
a0177bd56a pw.8: Sorty synopsis flag
MFC after:	1 week
2022-04-03 13:54:10 +02:00
Mateusz Piotrowski
feb04c7b7c pw.8: Improve argument names
Arguments passed to flags like -d and -k had ambiguous names like "dir".
Change that to more descriptive names like "homedir".

Also, clarify that -u min,max is for UIDs and -i min,max for GIDs.

MFC after:	1 week
2022-04-03 13:54:09 +02:00
Alfonso S. Siciliano
6833ac673d
bsdinstall netconfig: Replace dialog(1) with bsddialog(1)
Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1).

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34682
2022-04-02 21:33:40 +02:00
Gordon Bergling
3b31bf26b4 cron(8): Fix a typo in the documentation
- s/commmand/command/

MFC after:	3 days
2022-04-02 15:16:33 +02:00
Gordon Bergling
a16977209b pnfsserver(4): Fix a typo in the manual page
- s/commmand/command/

MFC after:	3 days
2022-04-02 15:12:51 +02:00
Gordon Bergling
cf226430bb efivar(8): Fix a typo in a source code comment
- s/differnt/different/

MFC after:	3 days
2022-04-02 13:34:46 +02:00
Mateusz Piotrowski
39245a7d45 pw.8: Sort flags in synopsis
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
77fd0356ef pw.8: Use more appropriate mdoc macros
MFC after:	1 week
2022-04-02 00:49:53 +02:00
Mateusz Piotrowski
61e11ed9bd pw.8: Improve use of mdoc macros in description section
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Mateusz Piotrowski
5392b4fbb7 pw.8: Use Cm and Ar correctly in synopsis
MFC after:	1 week
2022-04-02 00:49:52 +02:00
Corvin Köhne
3256b7ca36 bhyve: avoid an empty passthru config value
pci_parse_legacy_config splits the options string by comma characters.
strchr returns a pointer to the first occurence of a character. In that
case, it's a comma. So, pci_parse_legacy_config will stop at the first
character and creates a new config node with a name of NULL.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D34600
2022-04-01 11:13:16 +02:00
Corvin Köhne
8ac8adda8d bhyve: avoid uninitialized variable
Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34688
2022-04-01 11:13:16 +02:00
Corvin Köhne
45ddbf2112 bhyve: avoid overflow of BAR index
At the moment, writes to BAR registers that aren't 4 byte aligned are
ignored. So, there's no overflow yet. Nevertheless, if this behaviour
changes in the future, it could unintentionally, introduce a buffer
overflow. Additionally, some compiler or tools will detect this
potential overflow and complain about it.

Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34689
2022-04-01 11:13:16 +02:00
Ed Maste
27c2f016b8 fstyp: Correct comment: Raspberry Pi Pico, not Nano
Fixes:		868c1b8431 ("fstyp: detect Raspberry Pi Pico boot...")
2022-03-30 13:04:11 -04:00
Ed Maste
868c1b8431 fstyp: detect Raspberry Pi Pico boot filesystem as FAT
fstyp looks for a 0x55 0xAA signature at offset 510, but this is not
required by specifications and is not proivded by the Raspberry Pi Nano
bootloader.

We should really remove the signature check and implement a more
comprehensive BPB validation instead, but it will require more
investigation and testing.  For now just add a special case for the
Raspberry Pi Nano bootloader, to avoid introducing regressions or new
false positives.

PR:		262896
Reviewed by:	delphij
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34699
2022-03-29 17:33:15 -04:00
Jens Schweikhardt
e50daba0e4 Remove extraneous semicolons trailing break and continue statements. 2022-03-29 19:48:11 +02:00
Alfonso S. Siciliano
2617d4df52
bsdinstall mount: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34651
2022-03-29 16:54:51 +02:00
Alfonso S. Siciliano
48af6ad902
bsdinstall fetchmissingdists: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34654
2022-03-29 16:43:01 +02:00
Alfonso S. Siciliano
230811a883
bsdinstall/distfetch: Remove duplicate header
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34685
2022-03-29 16:19:57 +02:00
Mateusz Piotrowski
075999d3f1 Cross-reference nextboot(8) and freebsd-update(8)
MFC after:	1 week
2022-03-29 15:15:35 +02:00