Commit Graph
3348 Commits
Author SHA1 Message Date
Lexi Winter 3447fc070c atf: Move the tests back to the tests package
Commit 9065390ddc moved atf to its own package, but mistakenly moved
the tests as well.  Put the tests back into the test package.

Approved by:	re (cperciva)
Fixes:	9065390ddc ("packages: Remove the tests-dev package")
MFC after:	1 day
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53594

(cherry picked from commit 4b342830ab)
(cherry picked from commit cdfa913977)
2025-11-06 21:46:58 -08:00
Dag-Erling Smørgrav ac84e695eb rc.subr: Fix slow shutdown issue
Instead of sleeping after pwait returns, use its new -p option to
obtain the list of processes that still have not terminated.

Approved by:	re (cperciva)
MFC after:	3 days
PR:		290357
Fixes:		5953e7c984 ("rc.subr: Move the sleep in wait_for_pids")
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D53294

(cherry picked from commit 22cff1f3e9)
(cherry picked from commit 7b375832c2)
2025-10-30 16:48:19 -07:00
Lexi Winter ac849c0a1e flua: Move to a new flua package
flua is a standalone third-party component that deserves its own
package.  In particular, this means things can use flua without
having to depend on FreeBSD-utilities, which will be useful as
more base utilities use flua.

This saves ~500kB in FreeBSD-utilities for systems which don't
need flua.

Approved by:	re (cperciva)
MFC after:	3 days
Reviewed by:	kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53161

(cherry picked from commit 957715f877)
(cherry picked from commit e4ef333917)
2025-10-30 09:15:09 -07:00
Mark Johnston 24546cb506 rc: Update dependencies for zpool scripts
After commit 900bc02063, zpool depends on mountcritlocal.  zpoolreguid
and zpoolupgrade depend on zpool and want to run before mountcritcycle,
so we have a pair of cycles.

Update zpoolreguid and zpoolupgrade to avoid this.

Approved by:	re (cperciva)
Reviewed by:	des
MFC after:	3 days
Fixes:	900bc02063 ("rc.d/zpool: change mountcritlocal dep from BEFORE to REQUIRE")
Differential Revision:	https://reviews.freebsd.org/D52953

(cherry picked from commit ae6db60ff5)
(cherry picked from commit 8e957b78e6)
2025-10-15 12:23:44 -07:00
Lexi Winter d8897097ed packages: Rename unbound to local-unbound
This more accurately reflects its purpose, and its contents, since
everything in the package is prefixed with "local-".

While here, add a message on upgrade about regenerating the config.

Approved by:	re (cperciva)
MFC after:	3 seconds
Requested by:	des
Reviewed by:	des
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53056

(cherry picked from commit bf84861460)
(cherry picked from commit f1b0e00d56)
2025-10-15 12:23:36 -07:00
Jose Luis Duran f315a3512c blocklist-helper: Silence a bogus pf warning
Silence a bogus warning about (an ethernet) anchor not being found.

It has been reported as PR 280516.  In the meantime, just sweep under
the carpet.

Approved by:	re (cperciva)
Approved by:	emaste (mentor)
MFC after:	2 days

(cherry picked from commit 2347ca21d6)
(cherry picked from commit ba5768504b)
2025-10-13 21:36:39 -07:00
Jose Luis Duran 2b6eb65612 blocklist: Rename blacklist to blocklist
Follow up upstream rename from blacklist to blocklist.

- Old names and rc scripts are still valid, but emitting an ugly warning
- Old firewall rules and anchor names should work, but emitting an ugly
  warning
- Old MK_BLACKLIST* knobs are wired to the new ones

Although care has been taken not to break current configurations, this
is a large patch containing mostly duplicated code.  If issues arise, it
will be swiftly reverted.

Approved by:	re (cperciva)
Reviewed by:	ivy (pkgbase)
Approved by:	emaste (mentor)
MFC after:	2 days
Relnotes:	yes

(cherry picked from commit 7238317403)
(cherry picked from commit 7f6f2139ee)
2025-10-13 21:36:35 -07:00
Christos Margiolis 2a6c17544e virtual_oss: Clean up rcorder
sndiod is part of audio/sndio, so we should avoid referencing a port
utility from base.

We should also require NETWORKING for the service to start, since
virtual_oss can be configured to send audio through the network.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	des, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D53019

(cherry picked from commit 188ddc15e5)
2025-10-10 23:23:31 +02:00
Lexi Winter 8a703d0988 libexec/rc/rc.d/Makefile: Use CONFGROUPS.yes
Replace .if statements with CONFGROUPS.${MK_FOO} where possible,
and also sort and re-indent the file for readability.

A couple of more complicated sections don't work with CONFGROUPS.yes
yet, so leave those as they are for now.

MFC after:	1 week
Reviewed by:	imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52974

(cherry picked from commit 56f9879c3d)
2025-10-10 05:32:52 +01:00
Dag-Erling Smørgrav df70662f47 rc: Teach netwait to wait for DAD
In some configurations, especially in jails, it is possible for the
system to boot so fast that we end up launching daemons while duplicate
address detection is still ongoing.  If that happens, said daemons may
fail to bind to IPv6 addresses, as they are still tentative.  Teach the
netwait service to wait (up to 10 seconds, by default) for the tentative
flag to vanish.

MFC after:	1 week
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D51889

(cherry picked from commit 5ead817c3b)

rc: Improve netwait DAD logic

Disable if IPv6 is not supported, and instead of 10 seconds, default to
one more than the value of net.inet6.ip6.dad_count.

Fixes:		5ead817c3b ("rc: Teach netwait to wait for DAD")
Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D52905

(cherry picked from commit ec6ad605ec)
2025-10-09 12:16:04 +00:00
Jesús Daniel Colmenares Oviedo 6c6b157a9f nuageinit: Ignore non-existent groups
In cloud-init, when a group specified in the 'users.{index}.groups' parameter
does not exist, it is ignored, but the user is created anyway. In the case of
nuageinit, it exits with an exception, since pw(8) expects each group to exist.

Reviewed by:		bapt@
Approved by:		bapt@
Differential Revision:	https://reviews.freebsd.org/D52718

(cherry picked from commit 68691160f4)
2025-10-07 08:51:18 +02:00
Lexi Winter d63d221507 libexec: Move blacklistd-helper to the blocklist package
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52830

(cherry picked from commit 63ce00f5d0)
2025-10-03 20:21:50 +01:00
Lexi Winter 085b0eb3eb packages: Add a sound package
Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools
into a new "sound" package.  Don't create a separate -lib package,
since it's unlikely someone will want mixer(3) without mixer(8).

Put the sound package in the optional set rather than minimal, since
it's not actually required for audio hardware support, and many systems
(including nearly all servers) won't want it installed.

MFC after:	3 seconds
Reviewed by:	christos
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52823

(cherry picked from commit 1b806e607f)
2025-10-03 09:50:05 -07:00
Dag-Erling Smørgrav 384006a4c5 rc.subr: Move the sleep in wait_for_pids
Instead of sleeping while constructing the list of PIDs to wait for,
sleep briefly after pwait to give init a chance to reap the processes
that just terminated before we loop around and start probing them.

PR:		289630
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D52619

(cherry picked from commit 5953e7c984)
2025-10-02 08:19:22 +00:00
Christos Margiolis 5a31c62314 virtual_oss: Port to base
This patch diverges quite a bit from the current upstream [1] in a few
ways:

1. virtual_oss(8), virtual_bt_speaker(8) and virtual_oss_cmd(8) are
   actually separate programs.
2. Backends (lib/virtual_oss) are built as separate shared libraries and
   we dlopen() them in virtual_oss(8) and virtual_bt_speaker(8) on
   demand.
3. virtual_equalizer(8) and the sndio and bluetooth backends are built
   as ports, because they depend on third-party libraries.
4. Use newer libav API in bluetooth backend (see HAVE_LIBAV ifdefs) to
   address compiler errors.

[1] https://github.com/freebsd/virtual_oss

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D52308

(cherry picked from commit 9cab9fde5e)
(cherry picked from commit 86a7787e32)
(cherry picked from commit 69ede18b95)
(cherry picked from commit 0532cd2d77)
(cherry picked from commit 25d551b5fb)
(cherry picked from commit 8af6aee96e)
(cherry picked from commit f040ee6e40)
(cherry picked from commit bce8cdaf4c)
2025-10-02 09:31:27 +02:00
Lexi Winter 259bb93b80 Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:	3 days
Relnotes:	yes
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52739

(cherry picked from commit 614c8750ce)
2025-10-01 11:28:40 +01:00
Jose Luis Duran ec4771b17b ftpd: blocklist: Add a permission denied probe
Reviewed by:	emaste
Approved by:	emaste (mentor)
Obtained from:	NetBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52746

(cherry picked from commit 1060684b04)
2025-09-30 23:17:02 +00:00
Jose Luis Duran 268e74d149 ftpd: blocklist: Add an extra probe
Add a blocklist probe when user access is denied.

Reviewed by:	emaste
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52747

(cherry picked from commit 307929b211)
2025-09-30 23:16:45 +00:00
Jose Luis Duran 8f4e196e7e rc.d: Fix ftpd flags
After f99f0ee14e ("rc.d: add a service jails config to all base system
services"), the FTP service ignores the flags configured in ftpd_flags:

    # sysrc ftpd_flags=-B
    ftpd_flags:  -> -B
    # service ftpd enable
    ftpd enabled in /etc/rc.conf
    # service ftpd start
    Starting ftpd.
    # pgrep -fl ftpd
    1234 /usr/libexec/ftpd -D

Notice the absence of the "-B" flag.

PR:		285600
Reviewed by:	0mp, emaste
Approved by:	emaste (mentor)
Fixes:	f99f0ee14e ("rc.d: add a service jails config to all base system services")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52745

(cherry picked from commit 2872ced187)
2025-09-30 23:15:42 +00:00
Lexi Winter 9b11dacb95 packages: Move powerd to its own package
Nearly everyone wants powerd to manage CPU frequency scaling on real
hardware, even if -utilities isn't installed.  Conversely, very small
jails might want -utilities but don't need powerd.

Move it to its own package and add it to the minimal set.

MFC after:	1 day
Reviewed by:	manu, imp
Differential Revision:	https://reviews.freebsd.org/D52645

(cherry picked from commit 5efd371bba)
2025-09-25 02:00:40 +01:00
Vladimir Kondratyev 1bc5c9a232 rc.d/moused: Fix misplaced basename
This fixes "usage: basename string [suffix]" message.

Reported by:	cy
MFC after:	1 day

(cherry picked from commit f586fc0cf8)
2025-09-24 10:42:04 +03:00
Vladimir Kondratyev a4417b9f9c moused(8): Start moused with devd
It is appeared that currently starting of moused does not depend on
moused_enable variable value in rc.conf. That leads to missing USB mice
support in default configuration. Start moused in traditional per
device mode with devd to follow POLA.

One daemon per system mode still can be enabled with setting of
moused_port="auto"
moused_nondefault_enable="NO"
variables in /etc/rc.conf

To revert to sysmouse mode add moused_type="sysmouse" to /etc/rc.conf

Reported by:	many
Requested by:	glebius
Reviewed by:	glebius
MFC after:	1 day
Differential Revision:	https://reviews.freebsd.org/D52430

(cherry picked from commit 66e7f048f0)
2025-09-22 12:22:24 +03:00
Vladimir Kondratyev d5f63d6b37 moused(8): Add command line option to restrict interface type
to evdev or sysmouse. It is required to avoid receiving of double events
on hybrid devices supporting both interfaces like ums (4).

MFC after:	1 day
Reviewed by:	glebius (via private chat)
Differential Revision:	https://reviews.freebsd.org/D52647

(cherry picked from commit 1335bf5ce1)
2025-09-22 12:22:12 +03:00
Lexi Winter 22ae80be55 packages: Remove the tests-dev package
We don't want a tests-dev package, because this means set-devel depends
on tests-dev, which transitively depends on tests, which means you can't
install set-devel without also getting tests.

The only real "dev" files in tests-dev are from ATF (libprivateatf),
so move that to its own package and add a dependency from tests.

Also move Kyua to its own package, since this might be useful for
running tests even when the user doesn't want the whole set of base
tests installed.

Add a dependency from -tests to both -atf and -kyua, and a dependency
on -set-base, since the tests won't work without the full base system
installed.

The remaining "dev" files in tests are actually test artifacts, not real
development libraries.  Add a new NO_DEV_PACKAGE option to bsd.lib.mk,
which causes dev files to be installed in the base package instead of
creating a -dev package, and set this option for everything that
installs test libraries.

While here, add a slightly more informative description for the tests
package.

MFC after:	3 seconds
Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D52597

(cherry picked from commit 9065390ddc)
2025-09-19 02:17:29 +01:00
Jesús Daniel Colmenares Oviedo 24e5700d47 nuageinit: Add doas support
* Set mode of etc directory to 0755.
* Use user.localbase sysctl instead of /usr/local.
* Add test case for doas.
* Set ${LOCALBASE} instead of /usr/local in nuageinit(7) man page.

Reviewed by:            bapt@
Approved by:            bapt@
Differential Revision:  https://reviews.freebsd.org/D52437

(cherry picked from commit 9a829e8656)
2025-09-17 21:33:57 +02:00
Jesús Daniel Colmenares Oviedo 4a01ddbcd6 nuageinit: Allow the use of network parameters from network-config
To better comply with the cloud-init specification, we need to
support the configuration of network-related parameters from
the network-config file, which is common in most deployments.

Reviewed by:            bapt@
Approved by:            bapt@
Differential Revision:  https://reviews.freebsd.org/D52419

(cherry picked from commit 95230b248f)
2025-09-17 21:33:57 +02:00
Jesús Daniel Colmenares Oviedo dd293fbc08 nuageinit: Add me to copyright list
Approved by:    bapt@

(cherry picked from commit 18555060dc)
2025-09-17 21:33:57 +02:00
Jesús Daniel Colmenares Oviedo a00410fa19 nuageinit: chmod sudoers directory instead of chmod (again) sudoers file
* Set mode of sudoers to 0440.

Reviewed by:            bapt@, jlduran@
Approved by:            bapt@, jlduran@
Differential Revision:  https://reviews.freebsd.org/D52438

(cherry picked from commit a5cc9b7b96)
2025-09-17 21:33:56 +02:00
Jesús Daniel Colmenares Oviedo 7a7f44d618 nuageinit: Remove duplicate description of users.{user}.groups
Reviewed by:            bapt@
Approved by:            bapt@
Differential Revision:  https://reviews.freebsd.org/D52436

(cherry picked from commit 9f3330f522)
2025-09-17 21:33:56 +02:00
Colin Percival 6e7cc49f94 Make stable/15 a stable branch
* Turn off LLVM assertions
* Turn on production malloc and reproductible builds
* Set dumpdev="NO" in /etc/defaults/rc.conf
* Remove witness sysctl setting from install images
* Adjust branch to stable/15 in release.conf.sample
* Bump __FreeBSD_version
* Update UPDATING

Adjustments to kernel configurations will come in later commits.

Approved by:	re (implicit)
Sponsored by:	https://www.patreon.com/cperciva
2025-09-04 17:06:39 -07:00
Vladimir Kondratyev aef807876c moused(8): Add support for evdev protocol
The new daemon have following properties as compared with previous
incarnation:
- evdev protocol support for mices and touchpads. Additionally to
  relative PS/2 and USB devices it enables console support for I2C/USB
  touchpads and bluetooth mices.
- Other aged protocols like COM, raw PS/2 and X10 are dropped with only
  exception of sysmouse. For those who still use them there is an
  utility called msconvd(8).
- single daemon per system where hotplug is processed via devd socket.
  Per device mode still supported too.
- Configuration and quirks files in libinput-compatible format.
  Actually, the new moused config parser is taken from libinput.

The moused(8) can work in 2 modes:
1. Evdev support mode. It enables all previously mentioned devices.
   It is enabled by deault.
2. Sysmouse support mode. All should work as before.
   No new devices supported. To enable it add following lines to
   /etc/rc.conf:
      moused_port="/dev/psm0"
      moused_nondefault_enable="YES"
   One may add hw.usb.usbhid.enable=0 to /boot/loader.conf to enable
   ums(4) driver which supports sysmouse protocol.

Differential Revision:	https://reviews.freebsd.org/D52164
2025-09-05 00:07:25 +03:00
Warner Losh ffe00a0522 rc.d/serial: Kill dtrwait
The dtrwait wait functionality was dropped in the TTY MPSAFE rewrite for
FreeBSD 8. Remove referneces to it here. Also, the sysctl was renamed
for drainwait, so use the new name. Given the 16 years between this
event and somebody noticing, I strongly suspect this file can just be
removed.

Sponsored by:		Netflix
Reviewed by:		kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D52316
2025-09-02 23:18:09 -06:00
Warner Losh 4ec251a99a rc.d/serial: Remove removed drivers.
Cyclades and digiboard drivers were removed in 2017 and 2016
respectively. There's no need for these anymore.

Sponsored by:		Netflix
Reviewed by:		kevans, emaste
Differential Revision:	https://reviews.freebsd.org/D52315
2025-09-02 23:18:09 -06:00
Ed Maste 5eb80bf1a6 moused,syscons: Avoid warning if system has no /dev/ttyv*
A VM had no virtual terminals and emitted a warning on boot
`eval: cannot open /dev/ttyv*: No such file or directory`.

Break the loop in this case to avoid the warning.

PR:		289173
Reviewed by:	jlduran
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52344
2025-09-02 13:28:04 -04:00
Bjoern A. Zeeb 78807c196c rc: bluetooth: startup improvements
Fix a redirect of stderr to stdout which is going to /dev/null.
A '&' got missing in the original rewrite from the review that
I took and committed.  Seems no one had noticed during testing
or review.  People may have ended up with a "/1" file in their
root file system.

Fixes:		40652f86b5
Reported by:	Vladyslav Movchan (vladislav.movchan gmail.com)
MFX after:	3 days
X-MFC:		squash
2025-09-01 07:26:47 +00:00
Stephen Hurd 40652f86b5 rc: bluetooth: startup improvements
During startup hccontrol reset needs to be run multiple times
for iwbt to work more reliably.  Add a loop trying up to
three times.

Tested by:	various (original version; I changed test to -eq)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44861
2025-08-29 20:45:23 +00:00
Maxim Konovalov a7f19968ae nuageinit.7: put each sentence on a new line 2025-08-22 19:06:45 +00:00
Maxim Konovalov 95b0be1118 nuageinit.7: grammar fixes 2025-08-22 18:57:03 +00:00
Jesús Daniel Colmenares Oviedo ba5df7a2d0 nuageinit: Improvements for nuageinit
- Fix 'pkg update' usage:
  - The function 'nuage:run_pkg_cmd(...)' adds the flag '-y', which
    does not make sense with some commands such as 'pkg update',
    causing an error when updating the repository catalogs.
- Fix typo 'ssh-authorized-keys -> ssh_authorized_keys' in
  'nuageinit(7)' man page.
- Document 'ssh_authorized_keys' parameter.
- Use device configuration ID when no 'match' rule is specified:
  - This is the default behavior of cloud-init when no match rule is
    specified, so the device is configured anyway (even if it does not
    exist). This greatly simplifies things, since in many cases
    'if_vtnet(4)' is used, so there is no need to perform a comparison
    with the MAC address.
- Document 'network' parameter:
  - Add example to 'EXAMPLES' section.
- Set 'gateway[46]' only when 'addresses' is specified:
  - To comply with the cloud-init specification, 'gateway4' and 'gateway6'
    must only take effect when 'addresses' (or static configuration) is
    specified.
- Use a separate function to check 'match' rules:
  - This way, we can easily add new logic to new types of rules.
- Implement 'network.ethernets.{id}.match.name' parameter:
  - But unlike cloud-init, which works with glob expressions (although it
    depends on the network backend), this implementation takes advantage
    of Lua pattern-matching expressions.

    Also note that previously we were only concerned with one interface
    matching, however, to be cloud-init-compliant, we need to configure
    the matching interfaces (one or more).
- Set default router only once.
- Implement 'network.ethernets.{id}.wakeonlan' parameter.
- Implement 'network.ethernets.{id}.set-name' parameter.
- Implement 'network.ethernets.{id}.match.driver' parameter:
  - Rename 'get_ifaces(...)' function as 'get_ifaces_by_mac(...)'.
  - Add get_ifaces_by_driver(...) function.
- Implement 'network.ethernets.{id}.mtu' parameter.
- Implement 'nameservers' parameter.
- Use 'resolvconf(8)' to manipulate 'resolv.conf(5)'.
- Use 'tzsetup(8)' to set time zone.

Reviewed by:            bapt@
Approved by:            bapt@
Differential Revision:  https://reviews.freebsd.org/D51643
2025-08-22 14:40:36 -04:00
John Baldwin 7d6b5a918a rtld: Add UTRACE_LOAD_OBJECT traces for rtld and the main binary
These two objects are loaded by the kernel not rtld, but adding these
two traces means that UTRACE_LOAD_OBJECT traces now describe the
mappings for all executables and DSOs in a process' address space.

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D52034
2025-08-22 09:59:22 -04:00
John Baldwin e679319b84 rtld: Compute obj->maxsize for obj_rtld
Compute this while parsing the program headers in parse_rtld_phdr().

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D52033
2025-08-22 09:59:09 -04:00
Lexi Winter dc5ba6b8b4 Remove MK_GSSAPI
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled.  Backport this
behaviour to Heimdal so it works the same way.

While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system.  This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.

Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D51859
2025-08-20 19:42:20 +01:00
Jessica Clarke 6118587172 rtld-elf: Fix VDSO Obj_Entry mapsize and report in utrace(2)
Subtracing addr is only appropriate for position-dependent objects,
where vaddrbase would also be the same value. For position-independent
objects, like the VDSO (which we already assume due to setting vaddrbase
to 0), the segments start at 0, not addr.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D51924
2025-08-15 23:21:35 +01:00
Lexi Winter 837b13af68 Revert "Remove Secure RPC DES authentication"
This reverts commit 7ac276298b.

Requested by:	kib
2025-08-15 17:59:18 +01:00
Brooks Davis 0f434b2b50 rtld: require MAP_GUARD support
MAP_GUARD was added prior to 12.0.  We don't support such old kernels in
userspace so drop the support.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50731
2025-08-11 12:18:51 +01:00
Lexi Winter 7ac276298b Remove Secure RPC DES authentication
Following the earlier removal of keyserv, none of this functionality
works since it requires keyserv.

Remove the relevant symbols from libc's Symbol.map.  Leave compatibility
symbols for existing applications, but since the functions don't work
without keyserv, stub them out to return an error.

Remove some private symbols that were only used by keyserv; these don't
get compatibility symbols.

Remove the documentation for the old functions.

Remove rpc.ypupdated since it requires DES authentication.

Reviewed by:		manu, des, emaste
Differential Revision:	https://reviews.freebsd.org/D50442
2025-08-10 16:36:40 +01:00
Lexi Winter 992d2f9284 rc.d: Fix Kerberos rc scripts
Split the Kerberos rc scripts into two sections, one for MIT Kerberos
and one for Heimdal.  Don't install Heimdal-specific rc scripts (e.g.,
kfd) for the MIT case.

This does not include an OptionalObsoleteFiles change (even though one
is needed) because that will be fixed later in a different way.

Reviewed by:		des (previous version)
Differential Revision:	https://reviews.freebsd.org/D51830
2025-08-10 16:36:39 +01:00
Lexi Winter 5467020a54 rc.conf: Use user.localbase to determine _localbase
When running an rc.d script outside of boot, ${_localbase} isn't set,
and rc.conf hardcodes the default value to /usr/local.  Instead, try
to get the localbase from the user.localbase sysctl, and only fall
back to /usr/local if we can't for some reason.

This fixes e.g. /etc/rc.d/ldconfig when localbase has a non-default
value.

Reviewed by:		imp, des
Differential Revision:	https://reviews.freebsd.org/D51852
2025-08-10 16:36:39 +01:00
Brooks Davis 8d26a9da0c amd64: assume the kernel supports RDFSBASE and RDGSBASE
There is no need to support pre-12.0 (and thus pre-ino64) kernels in a
15.x libc.

Continue to check if the CPU supports these features before using them
and fall back as required.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D50732
2025-08-08 18:15:21 +01:00
Lexi Winter 2fb03d6c11 gssd: Be consistent about Makefile conditionals
gssd itself is only built when both MK_GSSAPI and MK_KERBEROS_SUPPORT
are enabled, but the init script and OptionalObsoleteFiles entries
only checked MK_GSSAPI.  Check both variables everywhere.

Reviewed by:		des
Differential Revision:	https://reviews.freebsd.org/D51812
2025-08-08 14:16:06 +01:00