Commit Graph

20710 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
e12b7446bd pw: Test home directory ownership and mode.
MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45099
2024-05-06 18:18:50 +02:00
Dag-Erling Smørgrav
46c4e86ebf adduser: Fix confusion between uclass and _class.
This caused adduser to produce an invalid `pw(8)` command line.  Due to
bugs in `pw(8)`, the command line was silently accepted and led to the
user being created, but locked out and with no home directory.

Also fix the default value for the “Another user?” prompt.

Fixes:		170d088290
MFC after:	3 days
Reviewed by:	karels, allanjude
Differential Revision:	https://reviews.freebsd.org/D45098
2024-05-06 18:18:47 +02:00
Dag-Erling Smørgrav
c86119328e pw: Don't silently ignore unparsed command line arguments.
MFC after:	3 days
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45097
2024-05-06 18:18:43 +02:00
Dag-Erling Smørgrav
a9ea647c29 pw: Rename some enums.
Rename `M_PRINT` and `M_UPDATE` to `M_SHOW` and `M_MODIFY` to match the
names of the commands they represent.  No functional change intended.

MFC after:	3 days
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45096
2024-05-06 18:18:39 +02:00
Lexi Winter
0ad9b235e1 arp(8): fix a typo in error message for -s/-S
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1214
2024-05-04 09:02:42 -06:00
Lexi Winter
2f9966ff63 packages: add package for NTP
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
2024-05-04 07:41:54 -06:00
Michael Osipov
aa48259f33 periodic.conf: remove long deprecated security_daily_compat_var()
This function is documented to be gone in after 11. Time to remove this
compat shim.

PR:		275296
Reviewed by:	jrm (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D44796
2024-05-03 09:38:55 +02:00
John Baldwin
a8089ea5ae nvmfd: A simple userspace daemon for the NVMe over Fabrics controller
This daemon can operate as a purely userspace controller exporting one
or more simulated RAM disks or local block devices as NVMe namespaces
to a remote host.  In this case the daemon provides a discovery
controller with a single entry for an I/O controller.

nvmfd can also offload I/O controller queue pairs to the nvmft.ko
in-kernel Fabrics controller when -K is passed.  In this mode, nvmfd
still accepts connections and performs initial transport-specific
negotitation in userland.  The daemon still provides a userspace-only
discovery controller with a single entry for an I/O controller.
However, queue pairs for the I/O controller are handed off to the CTL
NVMF frontend.

Eventually ctld(8) should be refactored to to provide an abstraction
for the frontend protocol and the discovery and the kernel mode of
this daemon should be merged into ctld(8).  At that point this daemon
can be moved to tools/tools/nvmf as a debugging tool (mostly as sample
code for a userspace controller using libnvmf).

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44731
2024-05-02 16:38:39 -07:00
John Baldwin
17c907dd7a ctladm: Add nvterminate command to drop active NVMeoF associations
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44729
2024-05-02 16:38:39 -07:00
John Baldwin
4f9fa31c5c ctladm: Add nvlist command to list active NVMeoF associations
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44728
2024-05-02 16:38:39 -07:00
John Baldwin
5fd68977a5 ctladm: Permit creating nvmf ports
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44727
2024-05-02 16:38:30 -07:00
John Baldwin
6f308bcf57 ctl: Support NVMe requests in debug trace functions
Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44719
2024-05-02 16:31:34 -07:00
John Baldwin
352cf4a64a ctl: Avoid an upcast for calling ctl_scsi_path_string
Change the first argument of ctl_scsi_path_string to be the embedded
header structure instead of the union.  Currently union ctl_io and
struct ctl_scsiio have the same alignment, but this changes on i386 if
a new union member is added that contains a uint64_t member (such as
an embedded struct nvme_command for NVMeoF).  In that case, union
ctl_io requires stronger alignment, so the upcast from struct
ctl_scsiio to union ctl_io in ctl_scsi_sense_sbuf raises an increasing
alignment warning on i386.

Avoid the warning by passing struct ctl_io_hdr as the first argument
to ctl_scsi_path_string instead.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44716
2024-05-02 16:30:20 -07:00
John Baldwin
afd0c206a6 ctladm: Use nitems() in a few more places
Sponsored by:	Chelsio Communications

Differential Revision:	https://reviews.freebsd.org/D45017
2024-05-02 09:55:15 -07:00
SHENG-YI HONG
e10b9d6602 bhyve: Move lock of uart frontend to uart backend
Currently, lock of uart in bhyve is placed in frontend. There are some
problems about it:

1. If every frontend should has a lock, why not move it inside backend
   as they all have same uart_softc.
2. If backend needs to modify the information of uart after initialize,
   it will be impossible as backend cannot use lock. For example, if we
   want implement a telnet support for uart in backend, It should wait
   for connection when initialize. After some remote process connect it,
   it needs to modify rfd and wfd in backend.

So I decide to move it to backend.

Reviewed by:	corvink, jhb, markj
Differential Revision:	https://reviews.freebsd.org/D44947
2024-05-01 11:09:31 -04:00
Mark Johnston
c1b37d909e bhyvectl: Add arm64 bits and hook it up to the build
For now this implementation doesn't provide any machine dependent
functionality on arm64, but it's enough to be able to reset and destroy
VMs.

Reviewed by:	jhb
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D44932
2024-05-01 08:33:23 -04:00
Mark Johnston
1c4ee7dfb8 bhyvectl: Prepare to add arm64 support
Move MD code into a separate directory and add a simple interface which
lets the MD bits register options and handle them.

No functional change intended.

Reviewed by:	jhb
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D44932
2024-05-01 08:31:00 -04:00
Olivier Certner
9b30b96c1f
Remove remnants of portsnap(8)
This was prompted by noticing that '/var/db/portsnap' still exists on
newly-installed machines.

With this change, all mentions of portsnap(8) in the tree are gone,
except for the historical note in the AUTHORS section of manpage
phttpget(8).

locate(1) will thus start indexing again '/var/db/portsnap' on machines
where this directory still exists, which may be a good way to push
administrators to delete it.

Reviewed by:            cperciva
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45023
2024-04-30 22:44:34 +09:00
Kristof Provost
5824df8d99 pf: convert DIOCGETSTATUS to netlink
Introduce pfctl_get_status_h() because we need the pfctl_handle. In this variant
use netlink to obtain the information.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-04-29 16:32:23 +02:00
Mark Johnston
390e44988a bhyve: Fix handling of -r
Just make "restore_file" a global variable so that it can be set by the
MD option handler.

Reviewed by:	corvink
Reported by:	bdrewery
Fixes:		981f9f7495 ("bhyve: Push option parsing down into bhyverun_machdep.c")
Differential Revision:	https://reviews.freebsd.org/D44974
2024-04-29 10:13:50 -04:00
Dag-Erling Smørgrav
9e8618276f adduser: Really fix a syntax error
Fixes:		5cafc38f11
Differential Revision:	https://reviews.freebsd.org/D44871
2024-04-29 12:29:35 +02:00
Lexi Winter
1b3c07bed6 package: move OpenBSM auditing into its own package
Move auditing runtime (auditd, etc.) into the new FreeBSD-audit package.
Also move the runtime OpenBSM manual pages from libbsm into auditd so
they get installed with the right package.

Add an UPDATING entry noting the new packages.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1197
2024-04-28 22:33:06 -06:00
Lexi Winter
0c0a2110f1 package: move authpf into the FreeBSD-pf package
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1198
2024-04-28 22:33:02 -06:00
Elyes Haouas
b561d8f59c zonectl: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
cbfd42cc07 wlandebug: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
abab59f662 usbconfig: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
4c6e656e2e rwhod: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
f93475cf0f pstat: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
67db7b43d0 ppp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:55 -06:00
Elyes Haouas
bccbb2fc4b ndp: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:54 -06:00
Elyes Haouas
83409a9357 moused: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:30:54 -06:00
Elyes Haouas
338d9c35d5 kbdcontrol: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:47 -06:00
Elyes Haouas
8f65dcd627 ctld: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:47 -06:00
Elyes Haouas
2f8ea2f605 ctladm: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:47 -06:00
Elyes Haouas
8918cc95e8 btxld: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:47 -06:00
Elyes Haouas
d1d652c060 rtadvctl: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:46 -06:00
Elyes Haouas
93e96d6c87 rtadvd: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:46 -06:00
Elyes Haouas
fdbf7cab91 bluetooth: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:46 -06:00
Chris Moerz
b30a7e5418
bhyve.8: Update and rearrange to improve readability
bhyve's man page is a very long block of text that has grown to
proportions that make it hard to read.  In particular, the level of
nesting of various content means man can no longer render the text in a
user-friendly way.

To remedy this:
- move the -s argument documentation into a separate section and
  reformat the various arguments so they are consistent
- add documentation on how to use the -o config.dump feature
- make the listing of various arguments more consistent
- consolidated duplicate listings of TPM backends
- add an example for the config.dump feature
- fix various formatting inconsistencies.

Reviewed by:	emaste, imp, jrm, Pau Amma <pauamma@gundo.com>, rgrimes
Differential Revision:	https://reviews.freebsd.org/D43940
2024-04-28 00:18:35 -03:00
Bjoern A. Zeeb
ad31d47642 bsdinstall: update comment related to pkg
pkg_add has been gone since 2013(?).  Refer to pkg(8) instead.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	jrtc27
Differential Revision: https://reviews.freebsd.org/D44946
2024-04-25 17:44:18 +00:00
Mark Johnston
71b2ba9099 bhyve.8: Document arm64 support
- Mention the options that are amd64-only.
- Provide a minimal example for booting an arm64 guest.

Reviewed by:	corvink
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D44738
2024-04-24 09:58:04 -04:00
Mark Johnston
107584716c bhyve.8: Remove mention of the -A flag
It is a no-op on amd64 now and is not implemented on arm64, so let's
remove mention of it altogether so as to reduce confusion for arm64
users.

Reviewed by:	corvink, jhb
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D44737
2024-04-24 09:57:12 -04:00
Warner Losh
560931508c Revert "bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors"
This reverts commit 91bdebc958. It wasn't
as ready as I thought
2024-04-23 21:18:56 -06:00
rilysh
91bdebc958 bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors
1. Currently, distfetch checks environment variables existence
when it will use them or in a case (in chdir()) it doesn't check
at all. As they are necessary to set before doing anything with
it, check them, if they set or not, before proceeding any further.
This also avoids extra cleaning when that environment variable
isn't set.

2. Handle memory allocation error in malloc(PATH_MAX) and replace
(sizeof const char *) with (sizeof char *). Both are similar and
const doesn't have a size.

3. Indent the error message a bit in chdir().

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1071
2024-04-23 16:42:38 -06:00
Lexi Winter
7209444a80 package: move cron into its own package
Reviewed by: imp, manu, Mina Galic
Pull Request: https://github.com/freebsd/freebsd-src/pull/1172
2024-04-22 22:36:35 -06:00
Lexi Winter
6ca1f3de57 package: move hv_{vss,kvp}_daemon into hyperv-tools
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1170
2024-04-22 22:36:35 -06:00
Joseph Mingrone
5cafc38f11
adduser: Fix a syntax error
Reported by:	Jose Luis Duran <jlduran@gmail.com>
Fixes:		b37333899b
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44871
2024-04-22 16:06:38 -03:00
Dag-Erling Smørgrav
b37333899b adduser: A few more improvements.
MFC after:	1 week
Reviewed by:	jrm
Differential Revision:	https://reviews.freebsd.org/D44871
2024-04-20 21:35:32 +02:00
Gordon Bergling
5235e9d646 binmiscctl.8: Remove a double word
- s/the the/the/

MFC after:	3 days
2024-04-20 11:15:20 +02:00
Lexi Winter
dbd0366f34 package: move lpr into its own package
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
2024-04-19 16:54:31 -06:00