Commit Graph

20099 Commits

Author SHA1 Message Date
Elyes Haouas
05d85d7781 lpr: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Elyes Haouas
34181db8bc cxgbetool: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Elyes Haouas
8b223768d1 bsnmpd/tools/libbsnmptools: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Elyes Haouas
b8b97d31bd pmcstat: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Elyes Haouas
de8b490010 bsnmpd/modules/snmp_hostres: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:39 -06:00
Elyes Haouas
8c9946be52 bsnmpd/modules/snmp_bridge: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:38 -06:00
Elyes Haouas
66ebda7a04 bluetooth: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:38 -06:00
Elyes Haouas
0dc159ced7 bhyve: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:38 -06:00
Cy Schubert
4d78061377 ntp: Update version string
Chase a466cc5537, updating the version string in the local config.h.

Reported by:	 Trond Endrestol <Trond.Endrestol@ximalas.info>
Fixes:		a466cc5537
MFC after:	immediately
2023-06-01 14:50:22 -07:00
Eric van Gyzen
aee3ee66a1 cron: fix build without LOGIN_CAP
Fixes:		fe590ffe40
MFC after:	on demand
Sponsored by:	Dell EMC Isilon
2023-06-01 16:24:22 -05:00
Baptiste Daroussin
fe06db1817 bsdinstall: remove sendmail hardening option
sendmail is fully disabled in 14.0 by default

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D40367
2023-06-01 23:00:22 +02:00
Rick Macklem
c21438cd14 nfsuserd.8: Substitute server for slave terminology
Commit 33906122e1 replaced the use of "slave" with "server"
for nfsuserd.c.  This patch does the same for nfsuserd.8.

Discussed with:	karels
Differential Revision:	https://reviews.freebsd.org/D39877
2023-06-01 13:49:04 -07:00
Rick Macklem
88ea962879 rpc.tls[serv|clnt]d.c: Clean up code for OpenSSL3
There were several function calls that are deprecated for
OpenSSL1.1.1.  These have been removed.
There was also a function call deprecated for OpenSSL3 and
that one has been #ifdef'd on OPENSSL_VERSION_NUMBER.

Reviewed by:	emaste, ngie
Differential Revision:	https://reviews.freebsd.org/D40275
2023-06-01 13:43:00 -07:00
Eric van Gyzen
fe590ffe40 Import vixie cron 4.0
Specifically, import the diff from commit e745bd4c10ab to
commit 83563783cc2 in https://github.com/vixie/cron.git

My sole motivation is changing to the common MIT license.
The old license, especially the "buildable source" clause,
is unfriendly for commercial users of this code.  Simply
changing the license without importing [most of] the code
accompanying that license seemed legally dubious.

The most regrettable change is losing Paul's uucp path.
I partially atone for this loss by restoring the upstream
$Id$ tags, since $FreeBSD$ is no longer useful.

This is [intended to be] a complete list of the functional
changes in this commit.  Some changes were made so that we
could consider vixie cron to be our upstream and reduce our
diffs against it, while others were simply a good idea.

- main() - use putenv instead of setenv for PATH
- open_pidfile no longer needs snprintf to build pidfile
- crontab main() - abort() on impossible errors
- check for truncation when building strings with snprintf
- getdtablesize() -> sysconf(_SC_OPEN_MAX)

These changes were not taken from upstream's 4.0 diff because
they [could] actually change behavior.  Some of them might be
beneficial, but should be taken separately.

- config.h - sendmail args: remove -oi and add -or0s
- call setlocale(LC_ALL, "") at the top of main()
- acquire_daemonlock - we already use pidfile
- cast getpid(), uid_t, and gid_t to long for printf
- remove unnecessary braces - I consider them beneficial
- BSDi support
- glue_strings() - use snprintf(), as we often already did

MFC after:	on demand
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D40260
2023-06-01 14:14:07 -05:00
Cy Schubert
a466cc5537 ntp: import ntp-4.2.8p16
Security:       NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555)
MFC after:	immediately
2023-06-01 07:04:37 -07:00
Ed Maste
dc10368634 unbound: avoid calling deprecated OpenSSL function
SSL_CTX_set_ecdh_auto is deprecated and has no effect (for reference see
2ecb9f2d18).

As unbound's config.h is manually maintained just turn off
HAVE_DECL_SSL_CTX_SET_ECDH_AUTO so that the deprecated function won't
be called.

Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40341
2023-05-30 19:55:55 -04:00
Jessica Clarke
94426d21bf pmc: Rework PROCEXEC event to support PIEs
Currently the PROCEXEC event only reports a single address, entryaddr,
which is the entry point of the interpreter in the typical dynamic case,
and used solely to calculate the base address of the interpreter. For
PDEs this is fine, since the base address is known from the program
headers, but for PIEs the base address varies at run time based on where
the kernel chooses to load it, and so pmcstat has no way of knowing the
real address ranges for the executable. This was less of an issue in the
past since PIEs were rare, but now they're on by default on 64-bit
architectures it's more of a problem.

To solve this, pass through what was picked for et_dyn_addr by the
kernel, and use that as the offset for the executable's start address
just as is done for everything in the kernel. Since we're changing this
interface, sanitise the way we determine the interpreter's base address
by passing it through directly rather than indirectly via the entry
point and having to subtract off whatever the ELF header's e_entry is
(and anything that wants the entry point in future can still add that
back on as needed; this merely changes the interface to directly provide
the underlying variables involved).

This will be followed up by a bump to the pmc major version.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D39595
2023-05-31 00:20:36 +01:00
Jessica Clarke
53d0b9e438 pmc: Provide full path to modules from kernel linker
This unifies the user object and kernel module paths in libpmcstat,
allows modules loaded from non-standard locations (e.g. from a user's
home directory when testing) to be found and, since buffer is what all
the warnings here use (they were never updated when buffer_modules were
added to pick based on where the file was found) has the side-effect of
ensuring the messages are correct.

This includes obsoleting the now-superfluous -k option in pmcstat.

This change breaks the hwpmc ABI and will be followed by a bump to the
pmc major version.

Reviewed by:	jhb, jkoshy, mhorne
Differential Revision:	https://reviews.freebsd.org/D40048
2023-05-31 00:15:34 +01:00
Chuck Silvers
d464a7698d ffs: restore backward compatibility of newfs and makefs with older binaries
The previous change to CGSIZE had the unintended side-effect of allowing
newfs and makefs to create file systems that would fail validation when
examined by older commands and kernels, by allowing newfs/makefs to pack
slightly more blocks into a CG than those older binaries think is valid.
Fix this by having newfs/makefs artificially restrict the number of blocks
in a CG to the slightly smaller value that those older binaries will accept.
The validation code will continue to accept the slightly larger value
that the current newfs/makefs (before this change) could create.

Fixes:		0a6e34e950
Reviewed by:	mckusick
MFC after:	3 days
Sponsored by:	Netflix
2023-05-29 19:26:28 -07:00
Rick Macklem
a94018e200 nfsuserd: Improve failure message when running in a jail
If a jail is not correctly configured to run nfsd(8)
in the jail, nfsuserd(8) cannot run.
This patch improves the failure message for this case.

MFC after:	2 weeks
2023-05-29 13:38:07 -07:00
Rick Macklem
697727110b gssd: Improve failure message when running in a jail
If a jail is not correctly configured to run nfsd(8)
in the jail, gssd(8) cannot run.
This patch improves the failure message for this case.

MFC after:	2 weeks
2023-05-28 11:08:38 -07:00
Alexander V. Chernikov
c90901245e netlink: update rta_multipath conditions in arp/ndp after 656a39c1a0 2023-05-27 13:25:16 +00:00
Mark Johnston
14c5cf3a16 makefs/zfs: Avoid generating a GUID of zero 2023-05-26 15:38:08 -04:00
Pierre Pronchery
7409d45ed4 auditdistd: Request the OpenSSL 1.1 API
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-26 09:20:27 -04:00
Enji Cooper
9a49a37929 mptutil: document that disabled/enabled are also supported
This change officially documents the fact that the `volume cache
enabled` and `volume cache disabled` are also supported.

While here, remove an unnecessary newline at the end of a warn*(3) call.
warn*(3) adds a newline automatically.

MFC after:	1 week
2023-05-24 21:56:42 -07:00
Pierre Pronchery
baef3a5b58 tcpdump: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 19:44:24 -04:00
Pierre Pronchery
96e6e5b5fe ppp: specify OpenSSL 1.1 APIs
OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future change should migrate to use the OpenSSL 3.0 APIs.

PR:		271615
Reviewed by:	emaste
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
2023-05-24 14:55:07 -04:00
Mark Johnston
2c0a6d0e7b bhyvectl: Update usage of vm_run()
Fixes:	e17eca3276 ("vmm: Avoid embedding cpuset_t ioctl ABIs")
2023-05-24 08:23:22 -04:00
Mark Johnston
80764cdb73 bhyve: Remove the exitcode stats structure
This structure isn't used for anything, and only counts a subset of
vmexit types.  Moreover, it is not accurate since there is no
synchronization between vcpu threads.  Simply remove it.

No functional change intended.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40245
2023-05-23 21:17:02 -04:00
Mark Johnston
e17eca3276 vmm: Avoid embedding cpuset_t ioctl ABIs
Commit 0bda8d3e9f ("vmm: permit some IPIs to be handled by userspace")
embedded cpuset_t into the vmm(4) ioctl ABI.  This was a mistake since
we otherwise have some leeway to change the cpuset_t for the whole
system, but we want to keep the vmm ioctl ABI stable.

Rework IPI reporting to avoid this problem.  Along the way, make VM_RUN
a bit more efficient:
- Split vmexit metadata out of the main VM_RUN structure.  This data is
  only written by the kernel.
- Have userspace pass a cpuset_t pointer and cpusetsize in the VM_RUN
  structure, as is done for cpuset syscalls.
- Have the destination CPU mask for VM_EXITCODE_IPIs live outside the
  vmexit info structure, and make VM_RUN copy it out separately.  Zero
  out any extra bytes in the CPU mask, like cpuset syscalls do.
- Modify the vmexit handler prototype to take a full VM_RUN structure.

PR:		271330
Reviewed by:	corvink, jhb (previous versions)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40113
2023-05-23 21:15:59 -04:00
Bjoern A. Zeeb
0be82d56b4 fwget: update pci_network_mediatek for mt7996
Add support for another chipset and fix mt7915 to not match on
all IDs.
2023-05-23 23:41:24 +00:00
Mike Karels
3bb92304b4 bsdinstall on zfs: create dataset for /home rather than /usr/home
Now that pw (hence adduser and the initial install) use /home for
user home directories rather than /usr/home, create a dataset for
/home rather than /usr/home.  Update the man page to match.

Reviewed by:	rgrimes, markj
Differential Revision:	https://reviews.freebsd.org/D40086
2023-05-23 07:18:27 -05:00
Mike Karels
bbb2d2ce42 pw: do not move /home/$user to /usr/home
When adding a user, pw will create the path to the home directory
if needed.  However, if creating a path with just one component,
i.e.  that appears to be in the root directory, pw would create the
directory in /usr, and create a symlink from the root directory.
Most commonly, this meant that the default of /home/$user would turn
into /usr/home/$user.  This was added in a self-described kludge 26
years ago.  It made (some) sense when root was generally a small
partition, with most of the space in /usr.  However, the default is
now one large partition.  /home really doesn't belong under /usr,
and anyone who wants to use /usr/home can specify it explicitly.
Remove the kludge to move /home under /usr and create the symlink,
and just use the specified path.  Note that this operation was
done only on the first invocation for a path, and this happened most
commonly when adding a user during the install.

Modify the test that checked for the creation of the symlink to
verify that the symlink is *not* made, but rather a directory.
Add a test that intermediate directories are still created.

Reviewed by:	rgrimes, bapt
Differential Revision:	https://reviews.freebsd.org/D40085
2023-05-23 07:17:42 -05:00
Rose
5a9c724847 Correct size parameter to strncmp
The wrong value passed to strncmp meant that only enable and disable were being
accepted. This change corrects the logic so enabled and disabled are also
accepted.

Pull Request: https://github.com/freebsd/freebsd-src/pull/739
MFC after: 1 week
Reviewed by: delphij, ngie
2023-05-22 18:16:29 -07:00
Bjoern A. Zeeb
5138ffa877 fwget: remove logging redirects
After adding addpkg() in 10aa369afd
the redirects are no longer needed.  We can now log directly so
simplify the code.

Reported by:	manu
Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D40077
2023-05-20 11:20:41 +00:00
Bjoern A. Zeeb
dd8a74e74d fwget: add support for various WiFi NICs
Add support for Realtek, QCA, and Mediatek WiFi NIC cards.
We group the matching entries by driver in sub-functions in order
to semi-automatically create the lists for now.

Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D40073
2023-05-20 11:18:51 +00:00
Bjoern A. Zeeb
17cec33e75 fwget: improve the pci base script
When matching "class" only match the class byte and not subclass and
programming interface.
Extend the list of supported classes by network, old, and misc (for no
better names on the latter two).
Extend the list of known vendors for various WiFi NICs.
Add a "pci_fixup_class" as some wireless cards have unexpected PCI
classes set.  In case we cannot find a matching file for the original
try to see if a "fixed up" version exists.  This allows us to avoid
duplicate matching files for the same vendor/driver but different
chipsets.

Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D40072
2023-05-20 11:16:42 +00:00
Bjoern A. Zeeb
10aa369afd fwget: simplify adding firmware images to pkg to install
Rather than using echo to return the firmware package name, call a
new function (addpkg) which will also deal with (i) no leading space
and (ii) remove duplicates (as some devices have dual-wifi-cards).
In addition we won't have a line break when having multiple packages.

While here also do not call pkg(8) anymore if there is no package to
install and use the correct variable to install all and not just the
last found package.

Reviewed by:	manu, bapt
Differential Revision: https://reviews.freebsd.org/D40071
2023-05-20 11:13:12 +00:00
Corvin Köhne
26d9f973d8
bhyve: error out if fwcfg user file isn't read completely
At the moment, fwcfg reads the file once at startup and passes these
data to the guest. Therefore, we should always read the whole file.
Otherwise we should error out.

Additionally, GCC12 complains that the comparison whether
fwcfg_file->size is lower than 0 is always false due to the limited
range of data type.

Reviewed by:		markj
Fixes:			ca14781c81 ("bhyve: add cmdline option for user defined fw_cfg items")
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40076
2023-05-17 15:39:37 +02:00
pbuff
e0155c6989 pw: The pw_checkname function has added ';' checking.
The pw_checkname function forgot to include a ';'
when checking usernames, causing shell commands
to be executed when a username with a ';' is deleted.

PR:		271427
MFC After:	3 days
2023-05-16 08:48:08 +02:00
Kirk McKusick
0a6e34e950 Fix size differences between architectures of the UFS/FFS CGSIZE macro value.
The cylinder group header structure ended with `u_int8_t cg_space[1]'
representing the beginning of the inode bitmap array. Some architectures
like the i386 rounded this up to a 4-byte boundry while other
architectures like the amd64 rounded it up to an 8-byte boundry.
Thus sizeof(struct cg) was four bytes bigger on an amd64 machine
than on an i386 machine. If a filesystem created on an i386 machine
was moved to an amd64 machine, the size of the cylinder group
calculated by the CGSIZE macro would appear to grow by four bytes.
Filesystems whose cylinder groups were exactly equal to the block
size on an i386 machine would appear to have a cylinder group that
was four bytes too big when moved to an amd64 machine. Note that
although the structure appears to be too big, it in fact is fine.
It is just the calaculation of its size that is in error.

The fix is to remove the cg_space element from the cylinder-group
structure so that the calculated size of the structure is the same
size on all architectures.

Reported by:  Tijl Coosemans
Tested by:    Tijl Coosemans and Peter Holm
MFC after:    1 week
Sponsored by: The FreeBSD Foundation
2023-05-15 12:57:15 -07:00
Michael Osipov
d2b4753f06 periodic: Use locale-agnostic (ISO 8601) timestamp format
Instead of reyling on locale-sensitive output which can be mangled when e-mailed
use consistently ISO 8601 format which contains the same information as '-T'.

PR:		271240
MFC After:	3 days
2023-05-15 09:26:48 +02:00
Baptiste Daroussin
ef7d0eb948 pw: do not call system()
Calling system makes pw(8) spawn a shell, which can then be abused.

MFC After:	3 days
2023-05-15 08:59:08 +02:00
Warner Losh
eb8f887758 spdx: The BSD-3-Clause-FreeBSD identifier never was, drop -FreeBSD
There never was a BSD-3-Clause-FreeBSD SPDX identifier. Replace it
with BSD-3-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:04 -06:00
Warner Losh
eebd9d5366 spdx: Simplify BSD-2-Clause AND BSD-2-Clause
After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:04 -06:00
Warner Losh
b61a573019 spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:04 -06:00
Warner Losh
4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Corvin Köhne
b67f0d360b
bhyve: import OpRegion definitions
Those definitions are required for the GVT-d emulation to parse the
OpRegion.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40037
2023-05-12 09:29:51 +02:00
Corvin Köhne
93cf93179c
bhyve: add helper for passthru specific mmio ranges
Intel GPUs have two special memory regions. They are called Graphics
Stolen Memory and OpRegion. bhyve has to emulate both of them. In order
to keep track of those special regions, add generic mmio ranges to the
passthru emulation.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40036
2023-05-12 09:29:44 +02:00
Corvin Köhne
99aeb28b2f
bhyve: don't panic if e820 finds no available memory
The GVT-d emulation tries to allocate some specific memory. It could
happen that this address doesn't exist. In that case, GVT-d will fall
back to allocate any address. Nevertheless, this only works if the e820
fails with an error instead of exiting on an assertion.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40034
2023-05-12 09:29:39 +02:00