Commit Graph

19871 Commits

Author SHA1 Message Date
Xin LI
cbfeaa80e3 Update leap-seconds to leap-seconds.3676924800
Obtained from:  ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800

(cherry picked from commit 8a607939de)
2024-06-20 22:46:46 -07:00
Ed Maste
6e1a7ade21 mergemaster: postpone removal to FreeBSD 15
Mergemaster has been deprecated for quite some time, but was not
removed prior to FreeBSD 14.0.  Update the deprecation notice in the man
page to reflect this.

PR:		274967
Reported by:	naddy
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 73cce7d888)
(cherry picked from commit c0e5d8f9bd)
2024-06-18 10:20:41 -04:00
Bjoern A. Zeeb
4cb9d58026 bsdinstall: update comment related to pkg
pkg_add has been gone since 2013(?).  Refer to pkg(8) instead.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	jrtc27
Differential Revision: https://reviews.freebsd.org/D44946

(cherry picked from commit ad31d47642)
2024-06-12 16:56:20 +00:00
Michael Osipov
ac339672fb 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

(cherry picked from commit aa48259f33)
2024-06-05 10:08:28 +02:00
Cy Schubert
858f4e52dd ntp: Update version strings
Reported by:	"Herbert J. Skuhra" <herbert@gojira.at>
Fixes:		f5f40dd63b

(cherry picked from commit 018a4ab7b0)
2024-05-29 18:42:54 -07:00
Cy Schubert
6f3fd5d45e ntp: Vendor import of ntp-4.2.8p18
Merge commit '1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad' into main

(cherry picked from commit f5f40dd63b)
2024-05-29 18:42:54 -07:00
Cy Schubert
a11839e617 unbound: Vendor import 1.20.0
Release notes at
	https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:	The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main

(cherry picked from commit 335c7cda12)
2024-05-20 12:47:06 +00:00
Dag-Erling Smørgrav
14a33d7a00 adduser: Additional variable fixes.
One function used `_input` without making it local, causing its value to
leak into other functions.  This broke the `-f` case.  Fix that instance
and initialize all local variables that weren't already initialized.

Fixes:		170d088290
MFC after:	3 days
Reviewed by:	karels
Differential Revision:	https://reviews.freebsd.org/D45204

(cherry picked from commit 46a619c6d4)
2024-05-15 15:59:16 +00:00
Dag-Erling Smørgrav
7f97e3f471 Add man page for nfslockd.
PR:		130238
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45139

(cherry picked from commit 44e72c6e2e)
2024-05-14 08:59:12 +02:00
Dag-Erling Smørgrav
9f21d0ef91 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

(cherry picked from commit 46c4e86ebf)
2024-05-09 11:05:36 +00:00
Dag-Erling Smørgrav
e3bd4b9288 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

(cherry picked from commit a9ea647c29)

pw: Don't silently ignore unparsed command line arguments.

MFC after:	3 days
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D45097

(cherry picked from commit c86119328e)

pw: Test home directory ownership and mode.

MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45099

(cherry picked from commit e12b7446bd)
2024-05-09 11:05:35 +00:00
Naman Sood
3532d9c66e pw: Ensure group membership is not duplicated
Fix the following problem:

1. A nonexistent user, someuser, is added to somegroup in /etc/group.
2. someuser is then created with membership in somegroup.

The entry for somegroup in /etc/group will then contain

    somegroup:*:12345:someuser,someuser

With this fix, the entry will be

    somegroup:*:12345:someuser

PR:		238995
Reviewed by:	bapt, jrm
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41076

(cherry picked from commit 17839f45d8)
2024-05-09 11:04:30 +00:00
Jessica Clarke
91e0b44c15 kldxref: Fix bootstrapping on macOS with Clang 16 / Apple Clang 15
macOS, like Linux, does not include an outer const qualifier for its
fts_open callback arguments, so -Wincompatible-function-pointer-types
also picks this up and breaks the build now Clang 16 makes it an error
by default. Extend the existing Linux support to fix this.

MFC after:	1 week

(cherry picked from commit 75464941dc)
2024-05-02 21:11:52 +01:00
Dag-Erling Smørgrav
b7a56907af adduser: Overhaul.
Most importantly:

* Make local variables local.
* Use `$()` instead of backticks.
* Avoid unsafe use of `-a` and `-o` operators in `test` expressions.
* Remove a hack intended to ease the transition from Perl 22 years ago.

MFC after:	1 week
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44863

(cherry picked from commit 170d088290)

adduser: A few more improvements.

MFC after:	1 week
Reviewed by:	jrm
Differential Revision:	https://reviews.freebsd.org/D44871

(cherry picked from commit b37333899b)

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

(cherry picked from commit 5cafc38f11)

adduser: Really fix a syntax error

Fixes:		5cafc38f11
Differential Revision:	https://reviews.freebsd.org/D44871

(cherry picked from commit 9e8618276f)
2024-04-29 12:30:39 +02:00
John Grafton
72fc3645e0 adduser(8): support creation of ZFS dataset
On systems utilizing ZFS, default to creating a ZFS dataset for a new
user's home directory if the parent directory resides on a ZFS dataset.
Add a flag that disables this behavior if the administrator explicitly
does not want it.

If run during installation from within a chroot, set mountpoint to legacy
after dataset creation and mount directly into the chroot.  Then umount
and reset the mountpoint to inherit from parent.

Also support ZFS default encryption on user's home directory.

Feedback by: delphij
Reviewed by: imp, kevans
Pull Request: https://github.com/freebsd/freebsd-src/pull/881

(cherry picked from commit 215c0a5158)
2024-04-29 12:16:06 +02:00
Sven Ruediger
1da8405cde add defaults for adduser.sh (OK? [yes] & additional user [no])
Event:		Kitchener-Waterloo Hackathon 202305
Differential Revision:	https://reviews.freebsd.org/D40157

(cherry picked from commit 9efad6f9e1)
2024-04-29 12:16:06 +02:00
Gordon Bergling
b6ddbb47e1 binmiscctl.8: Remove a double word
- s/the the/the/

(cherry picked from commit 5235e9d646)
2024-04-23 07:25:10 +02:00
Konstantin Belousov
7cf0b203f5 Revert "acpidump: dump AMD IVRS table describing IOMMU layout"
and related helping commits on stable/13. This reverts commits
256ee428f5
f95a254aa7
f7fd7f8b88

The acpi-ca version on stable/13 is too old.
2024-04-17 12:40:04 +03:00
Konstantin Belousov
02dc74cc21 pciconf(8): dump AMD IOMMU Base Capability
(cherry picked from commit 1e6db7be69)
2024-04-17 11:13:18 +03:00
Konstantin Belousov
256ee428f5 acpidump: add Foundation copyright
(cherry picked from commit f1519a8229)
2024-04-17 11:13:18 +03:00
Konstantin Belousov
f95a254aa7 acpidump: dump AMD IVRS table describing IOMMU layout
(cherry picked from commit 6d789b6126)
2024-04-17 11:13:18 +03:00
Konstantin Belousov
f7fd7f8b88 acpidump: add printfield() helper
(cherry picked from commit 969a4b8be5)
2024-04-17 11:13:18 +03:00
Konstantin Belousov
84944bf5e2 acpidump: bump WARNS to 6
(cherry picked from commit 29a6b72775)
2024-04-17 11:13:17 +03:00
Konstantin Belousov
930c76a733 acpidump: the acpi_get_fadt_revision() argument is unused
(cherry picked from commit 4262ad56a0)
2024-04-17 11:13:17 +03:00
Konstantin Belousov
f77abc3526 acpidump: silent the warning about unaligned uuid
(cherry picked from commit de937ecb75)
2024-04-17 11:13:17 +03:00
Michael Osipov
d596e57311 freebsd-update: Don't provide copiable commands in output
Previously, freebsd-update provided ready-to-go commands for copying and
pasting into the terminal. This causes problems as soon as options are
used and not supplied again by the user, e.g., '-b' or '-d'.
Stop making them copiable and force the user to construct a valid command
line by himself to avoid failures.

PR:		276102
Approved by:	jrm (mentor), emaste
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D43700
2024-04-17 08:51:38 +02:00
Mathieu
1e2be096d4 daemon: fix -R to enable supervision mode
If we're doing restarts, then we must supervise -- the 'R' case simply
got missed.

PR:	278342
Fixes:	f907027b49 ("daemon: set supervise_enabled during [..]")
(cherry picked from commit bbc6e6c5ec)
2024-04-17 00:50:03 -05:00
Rick Macklem
c39938ddd3 exports.5: Add RFC number for NFS over TLS
This is a content change.

(cherry picked from commit 401c0f8aa1)
2024-04-13 18:15:46 -07:00
a-biardi
c525951492 freebsd-update: Fix typo in comment
s/patchname expansion/pathname expansion/

Signed-off-by: a.biardi@tiscali.it
Pull-request: https://github.com/freebsd/freebsd-src/pull/1152
(cherry picked from commit 9181171162)
(cherry picked from commit 507e18dfc3)
2024-04-09 09:37:28 -04:00
John Baldwin
257f36a7db kldxref: Properly handle reading strings near the end of an ELF file
If a string is at or near the end of an input file and the amount of
remaining data in the file is smaller than the maximum string size,
the pread(2) system call would return a short read which is treated as
an error.  Instead, add a new helper function for reading a string
which permits short reads so long as the data read from the file
contains a terminated string.

Reported by:	jrtc27
Reviewed by:	jrtc27
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D44419

(cherry picked from commit 785600d0fb)
2024-04-08 11:06:41 -07:00
Michael Osipov
fc5208028a freebsd-update: mark "cron" as fetched as "fetch" itself
The change in 33bd05c318 was incomplete
because it did not mark "cron" as ISFETCHED=1 although it performs the
same operations as "install", but less output and does not perform a
hard exit. Mark result as such and make "install" know that updates have
been fetched.

PR:		277699
Approved by:	jrm (mentor), emaste, cperciva
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44356
2024-04-01 21:19:50 +02:00
Rick Macklem
23a48a469a nfsd.8: Document ways to minimize Copy operation times
For NFSv4.2, a Copy operation can take a long time to complete.
If there is a concurrent ExchangeID or DelegReturn operation
which requires the exclusive lock on all NFSv4 state, this can
result in a stall of the nfsd server.

This patch documents ways to avoid this problem.

This is a content change.

(cherry picked from commit 8f13abb4fd)
2024-03-31 19:16:36 -07:00
Mark Peek
14b2221ae7 efibootmgr: allow -u as a valid option
PR:		277907
Reported by:	vsasjason@gmail.com
MFC after:	1 week

(cherry picked from commit 65904399db)
2024-03-31 16:57:17 +00:00
Konstantin Belousov
1d2a587ef9 daemon(8): handle case of waitpid() returning without exited child
PR:	277764

(cherry picked from commit 8eaa6be80d)
2024-03-27 10:27:52 +02:00
Cy Schubert
e59ac68e25 unbound: Vendor import 1.19.3
Release notes at
	https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/

Merge commit '5a33598e88ad8fbc0affa74dee0a2d8cc4010fbc' into main

(cherry picked from commit b7c0c8c18e)
2024-03-23 19:22:47 -07:00
Ed Maste
0459337491 makefs: warn that ffs sectorsize other than 512 may not work
newfs always sets sectorsize to DEV_BSIZE (512) and derives some other
values based on the number of 512-byte sectors per real sector.  Similar
logic is required in makefs.  Until that happens, emit a warning that
the image may be incorrect.

PR:		276571
(cherry picked from commit 176b9e0d72)
(cherry picked from commit 8e40217819)
2024-03-22 15:03:48 -04:00
Eugene Grosbein
9fd628361b diskinfo(8): introduce new option -l
In modes -p or -s, add an option -l to start each line
with a device name separated with a tab. Update the manual page.
Add an example to list names with corresponding serial numbers:

diskinfo -ls /dev/da?

(cherry picked from commit e333110d1d)
2024-03-19 13:56:45 +07:00
Kyle Evans
79a095fa8a crunchgen: slap a dependency on the generated makefile for .lo
crunchgen generates a foo.lo for each binary it will end up crunching
into the final product.  While they have a dependency on the libs that
are used to link them, nothing will force relinking if the set of libs
needed to link them is changed.  Because of this, incremental builds may
not be possible if one builds a version of, e.g., rescue/ with a broken
set of libs specified for a project -- a subsequent fix won't be rolled
in cleanly, it will require purging the rescue/ objdir.

This is a bit crude, but the foo.mk we generate doesn't actually get
regenerated all that often in practice, so a spurious relink for the
vast majority of crunched objects won't actually happen all that often.

Reviewed by:	bapt, emaste, imp

(cherry picked from commit 6e2cfb24ee)
2024-03-17 22:34:09 -05:00
Andriy Gapon
1b92999e67 efibootmgr: fix potential endless loop with -v
I observed the problem on a system with fairly old and, apparently,
buggy EFI implementation.  A list of boot devices had an invalid
trailing entry.  efidp_size() for that entry returned zero, which means
that the code got stuck looping on that entry.

(cherry picked from commit bf87d4a4bf)
2024-02-17 21:22:08 +02:00
Cy Schubert
abe4ced2b9 unbound: Vendor import 1.19.1
Release notes at
    https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/

Security:	CVE-2023-50387, CVE-2023-50868
MFC after:	3 days

(cherry picked from commit b76ef9a7cb)
2024-02-17 05:47:29 -08:00
Gregory Neil Shapiro
a64caf2cb2 Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
Merge vendor sendmail 8.18.1 into HEAD

(cherry picked from commit d39bd2c138)

Add new source file for sendmail 8.18.1

(cherry picked from commit 19d4fb85bf)

New sendmail 8.18.1 cf file

(cherry picked from commit 1b6a5580c1)

Minor change to update these files so new freebsd*.cf files are
generated

(cherry picked from commit 2c191ba6b0)

Belatedly update version and date for sendmail 8.18.1 upgrade

(cherry picked from commit 31fbc98c94)

Add a note about sendmail 8.18.1's stricter SMTP protocol enforcement
(akin to commit 21c1f1deb6 in main)

Update import date for stable/14

Relnotes:	Yes
Security:	CVE-2023-51765
2024-02-07 02:47:40 +00:00
Mark Johnston
da2bb86507 mpsutil: Clean up libutil deps
mpsutil doesn't use libutil, so doesn't need to include libutil.h.  See
commit 76103694a0.

No functional change intended.

MFC after:	1 week

(cherry picked from commit d56ce5915c)
2024-01-31 09:17:25 -05:00
Mark Johnston
83b800c590 bhyve: Avoid underflows when handling remote commands
Reviewed by:	corvink, jhb
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D43480

(cherry picked from commit cfa2c78aee)
2024-01-30 09:19:28 -05:00
Michael Osipov
4c14a3a6ae periodic: Make daily diff(1) output as small is possible
Make, by default, daily diff(1) ignore whitespace changes and the unified output
a context of zero (0) lines. This reduces output of unrelated lines in e-mails
delivered to root.

PR:		270266
Approved by:	jrm (mentor), karels
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D42762

(cherry picked from commit e2f6bafc38)
2024-01-30 12:44:14 +01:00
Michael Osipov
6455c2cf85 periodic: Make daily diff(1) flags configurable with daily_diff_flags
PR:		270266
Approved by:	jrm (mentor), karels
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D42900

(cherry picked from commit 15e35d058c)
2024-01-30 12:43:54 +01:00
Michael Osipov
6d9195b5f7 periodic: Make security diff(1) output as small is possible
Make, by default, security diff(1) produce a unified output with a context of
zero (0) lines. This reduces output of unrelated lines in e-mails delivered
to root.

PR:		270266
Approved by:	jrm (mentor), karels
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D43071

(cherry picked from commit 3aa71ea7c2)
2024-01-30 12:43:33 +01:00
Chuck Tuffli
0d7fef9124 bhyve nvme: Add NQN value
Add a NVMe Qualified Name (NQN) to the Controller Data structure using
the "first format" (i.e., "... used by any organization that owns a
domain name" Section 7.9 NVM-Express 1.4c 2021.06.28 Ratified).

This avoids a Linux kernel warning about a missing or invalid NQN.

(cherry picked from commit 32557d16e2)
2024-01-28 23:55:18 -08:00
Peter Grehan
48214dfab8 Fix issue with Linux guest XHCI tablet probing.
The USB3 spec mandates that the	device-descriptor max packet size
be 512 bytes, which requires a field size of 9 since it	is a
power-of-2.

Linux kernels recently started validating this field, resulting	in
the table not being probed and the cursor not working in bhyve VNC.

PR:		275760

(cherry picked from commit 0c243cd4a3)
2024-01-28 19:03:25 +10:00
Yoshihiro Takahashi
f148fbe153 periodic: Fix periodic reports when log files are not compressed.
The modern zcat(1) is capable of handling compressed and uncompressed
text files, so we can simply use zcat command.

PR:		253168
Reviewed by:	delphij
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D43357

(cherry picked from commit 1fa4ddcc6d)
2024-01-24 21:08:58 +09:00
Kyle Evans
7b48fa60a5 bhyveload(8): document some SECURITY CONSIDERATIONS
The situation is improved now that we're running in a sandbox, but there
is still some host machine access that could be concerning depending on
the context.  These concerns may be somewhat mitigated by the fact that
the host machine usually provides the loader binary, even when the guest
image is providing the loader scripts -- they only bring the lua
scripts, and they have to be able to execute arbitrary syscalls rather
than the interfaces provided by libsa(3).

Reviewed by:	jhb, markj

(cherry picked from commit 5df041c4bb)
2024-01-22 11:17:53 -06:00