aboutsummaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* rtld: check for overflow in parse_integer()Konstantin Belousov3 hours1-0/+4
| | | | | | | Reviewed by: dim, emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56151
* pkgbase: Move all of ATF into the atf packageDag-Erling Smørgrav5 hours1-1/+0
| | | | | | | | | | | | Parts of ATF (including the licence and some of the documentation) were for some reason part of the tests package instead of the atf package. Moving them to where they logically belong poses no problem since tests already depends on atf. PR: 294129 MFC after: 1 week Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D56158
* libexec: Add pkg-serve directoryJose Luis Duran27 hours1-0/+1
| | | | | | | | Add pkg-serve to the list of subdirectories in the Makefile. Reviewed by: bapt Fixes: b42e852e89cb ("pkg-serve(8): serve pkg repositories over TCP via inetd (8)") Differential Revision: https://reviews.freebsd.org/D56009
* rtld: add a test for rtld_set_var (with LIBRARY_PATH_FDS)Alex S4 days2-0/+39
| | | | | | PR: 294054 Reviewed by: kib MFC after: 1 week
* rtld: properly handle update of several vars in rtld_set_var()Konstantin Belousov4 days1-36/+152
| | | | | | | | | | | | | | | | Besides setting the value in the array of the values, rtld sometimes needs to recalculate some internal control variable for the change to take effect. Allow the variable description to supply a method called on the update. Lock the function with the bind lock for safe operation. Mark several variables as allowed for update, since the on_update method is provided for them. The list is LD_BIND_NOW, LD_BIND_NOT, LD_LIBMAP_DISABLE, LD_LOADFLTR. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56055
* pkg-serve(8): serve pkg repositories over TCP via inetd (8)Baptiste Daroussin10 days6-0/+535
| | | | | Reviewed by: manu, bdrewery (previous version) Differential Revision: https://reviews.freebsd.org/D55895
* rtld-elf: Remove stray _exit prototype for aarch64Jessica Clarke2026-03-131-2/+0
| | | | | | | | | It's not clear why this is here. It's existed since the very first version of rtld-elf for aarch64 but has never been used, and anything actually using exit or _exit should be using rtld_libc.h's #define that aliases them to __sys_exit. Fixes: 047c6e3ae6ab ("Add the arm64 code to the runtime linker. It's not able to be built as we still need libc_pic for a few things, but this is expected to be ready soon.")
* stand: lua: break out a few more dirent types in lfsKyle Evans2026-03-091-0/+4
| | | | | | | | | | | | These are non-standard and specific to the version used in loader. We have some desire to recognize symlinks to avoid filtering out kernel symlinks in the autodetection bits when they would be perfectly fine to `load`. This won't be usable right away, so any impending use will need to be careful to account for nil. Reported by: leres
* rc.d/zfs: align zfs mount verbosity in host and jail environmentsSamvel Khalatyan2026-03-071-1/+1
| | | | | | | | | | | | | | | ZFS script runs different startup seqneces depending on where it runs: on the host (`zfs_start_main()`) or in a jail (`zfs_start_jail()`): - `zfs_start_main()` mounts ZFS datasets in verbose mode `zfs mount -va` - `zfs_start_jail()` mounts ZFS datasets silently `zfs mount -a`. This change aligns the verbose levels. NO_ISSUE Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2030
* Fix debug.sh comment typoKalevi Kolttonen2026-03-071-1/+1
| | | | | | Signed-off-by: Kalevi Kolttonen <kalevi@kolttonen.fi> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2012
* Fix hooks.sh comment typoKalevi Kolttonen2026-03-071-1/+1
| | | | | | Signed-off-by: Kalevi Kolttonen <kalevi@kolttonen.fi> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2013
* rc: virtual_oss: Silence potential hw.snd.default_unit errorChristos Margiolis2026-03-061-1/+1
| | | | | | PR: 293582 Sponsored by: The FreeBSD Foundation MFC after: 1 week
* nuageinit.7: Fix a couple of minor errorsNavdeep Parhar2026-02-281-3/+2
| | | | | | | | | | Use the correct key name in the chpasswd section. Remove a stray line to fix the description of 'password'. MFC after: 1 week Sponsored by: Chelsio Communications Reviewed by: maxim Differential Revision: https://reviews.freebsd.org/D55547
* virtual_oss: use hw.snd.default_unit by defaultQuentin Thébault2026-02-231-1/+2
| | | | | | | | | Reviewed by: christos MFC after: 1 week Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr> Sponsored by: Defenso PR: 293130 Pull Request: https://github.com/freebsd/freebsd-src/pull/2043
* debug.sh: Fix a typoArtem Bunichev2026-02-231-1/+1
| | | | | | MFC after: 3 days Reviewed by: emaste, guest-seuros, sjg, ziaee Differential Revision: https://reviews.freebsd.org/D55416
* rc.d: Convert more service to Use startmsgThibault Payet2026-02-082-2/+2
| | | | | | Signed-off-by: Thibault Payet <contact@thibaultpayet.fr> Reviewed by: imp,mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/2001
* flua: Fix SIGSEGV in lua_chown when uid/gid doesn't existJesús Daniel Colmenares Oviedo2026-02-081-4/+4
| | | | | | | | | | | | | When lua_chown is used to call chown(2) internally, it first resolves the user and/or group by calling the getpwnam_r(3) and getgrnam_r(3) functions, respectively. However, although it checks for errors, it does not check when entries are not found (which is not an error), which means that the buffer will be set to NULL, and since lua_chown attempts to access the NULL structure, it will receive a SIGSEGV signal. Reviewed by: imp@ Approved by: imp@ Differential Revision: https://reviews.freebsd.org/D55172
* Revert "Additional icache paranoia: non-PLT relocations can modify the text ↵Jessica Clarke2026-02-082-26/+0
| | | | | | | | | | | | | | | | | | segment." reloc_nonplt_object, and thus reloc_non_plt, only ever handles data relocations, so this paranoia is completely unfounded and only has the effect of significantly slowing down program startup for binaries with large amounts of code, like Clang. If this breaks any systems, that would likely be due to insufficient flushing in the pmap implementation for executable mappings, as this existing rtld behaviour would mask any such bugs. This reverts commit 4b51c69976fd84e93ec7695858375c8150c4fe61. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54221
* tftpd tests: clean trailing whitespaceEnji Cooper2026-02-031-9/+9
| | | | | | No functional change intended. MFC after: 1 week
* rc: run the zfs rc script before tmpKyle Evans2026-02-031-1/+1
| | | | | | | | | | | | | | | | | | The tmp rc script has much the same problem that the var does: it wants to test if /tmp is writable, and mount a tmpfs if it's not. This means that we actually want our zfs datasets mounted first, because we might have a /tmp dataset that changes the story. The ordering problem is particularly noticable with a r/o zfs root, since the write test will fail and we'll mount a tmpfs that later gets covered by our /tmp dataset. If that /tmp dataset inherited readonly, then we're still in trouble. This also fixes `tmpmfs=yes`, which would again get covered by a zfs dataset with the existing ordering. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D54995
* nuageinit: support fetching configuration on multiple ifaceBaptiste Daroussin2026-01-291-3/+8
| | | | | | | | | | | | | | On some environement a VM can be connected to multiple ifaces but only one will respond to dhcp and able to fetch the metadata. Launch the early dhclient on all available ifaces and as soon as one dhcp has successfully configured an iface, proceed with fetching the metadata. MFC After: 1 week Reported by: mateusz.klejn@ovhcloud.com Tested by: mateusz.klejn@ovhcloud.com Sponsored by: OVHcloud
* Set virtual_oss_enable="NO" in /etc/defaults/rc.confEric A. Borisch2026-01-291-0/+1
| | | | | | | | | | | This prevents 'service -e' from emitting (/var/log/messages): /usr/sbin/service: WARNING: $virtual_oss_enable is not set properly - see rc.conf(5) Pull Request: https://github.com/freebsd/freebsd-src/pull/1987 Reviewed by: christos Signed-off-by: eborisch@gmail.com MFC after: 1 week
* flua: lposix: fix WARNS=6 issuesKyle Evans2026-01-282-5/+8
| | | | | | | | | | | | | lposix is the last holdout of modules built into flua until we can fix the module design to have the right parts require()able. Address a valid bug in lua_read() found at a higher WARNS and drop the override entirely. Some of the modules could possibly be re-evaluated. Fixes: c2caf3b3313 ("flua: lposix: add more useful functions [...]") Reported by: des Reviewed by: des Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc.
* rtld: Use a helper variable to simplify a few linesJohn Baldwin2026-01-151-6/+5
| | | | | | Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54507
* libexec/rc/rc.d/Makefile: Remove duplicate mixer entryChristos Margiolis2026-01-151-1/+0
| | | | | | | | | Fixes: f74f891581bc ("src.opts: Introduce MK_SOUND") PR: 292436 Sponsored by: The FreeBSD Foundation MFC after: 4 days Reviewed by: ivy, emaste Differential Revision: https://reviews.freebsd.org/D54706
* rtld: Switch to using <assert.h> for assertJohn Baldwin2026-01-141-4/+1
| | | | | | | | | | The stock assert() works because rtld-libc includes a custom implementation of __assert(). Reviewed by: imp, kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54712
* rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointersJohn Baldwin2026-01-142-27/+25
| | | | | | | | | | | | | | This is a no-op on non-CHERI architectures, but is required for CHERI where Elf_Addr is only an address and not a complete pointer. While here, consistently use `uintptr_t *` for arrays of init/fini function pointers. Reviewed by: imp, kib Effort: CHERI upstreaming Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54711
* rtld: Simplify walking program headersJohn Baldwin2026-01-145-18/+12
| | | | | | | | | | Store phnum in Obj_Entry instead of phsize and use that to simplify the terminate expressions when iterating over program headers. Reviewed by: kib Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54710
* rtld-elf: Pass HWCAP flags to ifunc resolver functionsSarah Walker2026-01-132-5/+20
| | | | | | | | | | Function arguments are based on Section 9.4.1 "GNU C Library IFUNC interface" from "System V ABI for the Arm 64-bit Architecture (AArch64)", 2025Q1. (https://github.com/ARM-software/abi-aa/releases/download/2025Q1/sysvabi64.pdf) Reviewed by: kib, andrew Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D54559
* rc: Add os-release URL rc.conf variablesNVSRahul2026-01-122-7/+12
| | | | | | | | | | | | | | | | | | | | Add rc.conf defaults for the os-release URL settings introduced in the os-release rc.d script. This makes it easier for downstream integrators and appliances to override the URLs via rc.conf instead of patching the script. The following variables are added to libexec/rc/rc.conf: - osrelease_home_url - osrelease_documentation_url - osrelease_support_url - osrelease_bug_report_url These correspond to HOME_URL, DOCUMENTATION_URL, SUPPORT_URL, and BUG_REPORT_URL in the generated os-release file. Signed-off-by: NVSRahul <nvsrahul@hotmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1961
* rc: Improve os-release URLs and add rc.conf overridesNVSRahul2026-01-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | Add DOCUMENTATION_URL and SUPPORT_URL to the generated /var/run/os-release file, and route the existing URLs through rc.conf-configurable variables: - osrelease_home_url - osrelease_documentation_url - osrelease_support_url - osrelease_bug_report_url This allows downstreams and appliance vendors to customize these URLs without patching the base script, while providing useful defaults for stock FreeBSD installations. Tested: - sh -n libexec/rc/rc.d/os-release - (No FreeBSD host available; not runtime-tested yet) Signed-off-by: NVSRahul <nvsrahul@hotmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1961
* src.opts: Introduce MK_SOUNDChristos Margiolis2026-01-121-3/+4
| | | | | | | | PR: 291853 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: zarychtam_plan-b.pwste.edu.pl, markj Differential Revision: https://reviews.freebsd.org/D54456
* Remove all code under __SPE__Minsoo Choo2026-01-121-96/+0
| | | | | | Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1957
* Makefile*: remove powerpcspeMinsoo Choo2026-01-091-1/+1
| | | | | | | | | | | | As reported on the freebsd-announce mailing list[1] FreeBSD is continuing to retire 32-bit support. Remove powerpcspe from build infrastructure. [1] https://lists.freebsd.org/archives/freebsd-announce/2024-February/000117.html Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me> Reviewed by: jhibbits, emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1914
* nuageinit: fix test after recent behaviour changeBaptiste Daroussin2026-01-081-0/+4
| | | | | | | with recent change nuageinit always create a "freebsd" user, if no users are specified, which means we do need to get the rootdir in the testsuite containing a group file otherwise pw complains and the tests fails.
* nuageinit: set the hostname when user-data is missingGonéri Le Bouder2026-01-081-46/+67
| | | | | | | | | | | | | This address the situation reported here https://github.com/freebsd/freebsd-src/pull/1952#issuecomment-3720210259 The user-data file was missing and the `sethostname` function is never called. This commit adjusts slightly the logic to avoid the `exit()` call when the `user-data` file is missing. MFC After: 1 week Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net> Differential Revision: https://github.com/freebsd/freebsd-src/pull/1953
* nuageinit: only create the default user when neededGonéri Le Bouder2026-01-071-62/+88
| | | | | | | | | | | | | | | | The "default" user should only be created when: - the `users` key is missing - or the `default` string is present in the `users` list Since the `public_keys` is extracted from the meta-data, this patch has to slightly adjust the way they are loaded. The change simplify the logic around the default user SSH key injection. Both `ssh_authorized_keys` and `public_keys` are handled at the same time. MFC After: 1 week Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net> Pull Request: https://github.com/freebsd/freebsd-src/pull/1952
* nuageinit(7): pert mandoc linterBaptiste Daroussin2026-01-061-17/+17
| | | | MFC After: 1 week
* nuageinit/man: clarify how to enable sudo and doasGonéri Le Bouder2026-01-061-1/+11
| | | | | | | | | | Clarify that both `sudo` and `doas` are not part of the base system and they need to be listed in the `packages` section if the user wants to enable them. MFC After: 1 week Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net> Pull Request: https://github.com/freebsd/freebsd-src/pull/1944
* nuageinit: config2_network support dns service cfgGonéri Le Bouder2026-01-062-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | This change enhances `config2_network()` to honor the DNS configuration, when it's defined through the `services` section. The `network_data.json` file can hold DNS configuration at two different places: - within a network configuration entry - or `dns` entry in the `services` section, in this case the configuration is global. An example of such configuration: {"links": [{"id": "interface0", "type": "phy", "ethernet_mac_address": "52:54:00:01:59:03"}], "networks": [{"id": "private-ipv4-0", "type": "ipv4", "link": "interface0", "ip_address": "192.168.123.5", "netmask": "255.255.255.0", "routes": [{"network": "0.0.0.0", "netmask": "0.0.0.0", "gateway": "192.168.123.1"}], "network_id": "9e5b1ed9-f5e6-4941-a90f-2e06bab858de", "dns_nameservers": ["192.168.123.1"], "services": [{"type": "dns", "address": "192.168.123.1"}]}], "services": [{"type": "dns", "address": "192.168.123.1"}]} See: https://docs.openstack.org/nova/latest/user/metadata.html MFC After: 1 week Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net> Pull Request: https://github.com/freebsd/freebsd-src/pull/1941
* rtld: silence clang's unterminated-string-initialization warningAlex Richardson2025-12-162-2/+3
| | | | | | | | | | Since the initializer is used in other places where we can't just replace it with a char-by-char initializer, this adds a macro for the nonstring attribute (match the linuxkpi definition). Reviewed by: emaste, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52535
* ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9)Gleb Smirnoff2025-12-152-11/+0
| | | | | | | As a free bonus the tapping points are now able to match packet direction. Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D53875
* rc.subr: Use the variable we defined to invoke setaudit(8)Mark Johnston2025-12-141-1/+1
| | | | | | Reported by: gtetlow Fixes: 39ee24182b92 ("rc.subr: Support setting the audit user when starting services") MFC after: 1 week
* rc.d/ipfilter: ipfilter must be enabled for options to takeCy Schubert2025-12-101-6/+3
| | | | | | | | | | | | ipfilter options are erased and reset to default when ipfilter is disabled. This results in nullifying options from rc.conf that were previously set. 8d6feaaaa26f, which added this code, was incorrect as it was for a bug in ipfilter 4.2.28 and no longer applies to ipfilter 5.1.2. Fixes: 8d6feaaaa26f MFC after: 1 day
* rc.d/{ipfilter,ippool}: Fix typo in variable nameCy Schubert2025-12-092-2/+2
| | | | MFC after: 1 day
* noshutdown: Fix startup orderDag-Erling Smørgrav2025-12-081-1/+1
| | | | | | | | | | | This rc script exists solely to create a file, so have it explicitly require FILESYSTEMS. In its current form, it was as likely as not to end up running before cleanvar, which would undo its work. MFC after: 3 days Fixes: 384d976725a5 ("rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54119
* cleanvar: Fix startup orderDag-Erling Smørgrav2025-12-082-1/+2
| | | | | | | | | Instead of having FILESYSTEMS require cleanvar, which doesn't really make semantic sense, say that cleanvar needs to run before FILESYSTEMS. MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54118
* rtld-elf: Mark LD_SHOW_AUXV insecureDag-Erling Smørgrav2025-12-031-1/+1
| | | | | | | | This prevents dumping the memory layout of setugid processes. MFC after: 3 days Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54033
* ipfilter: Load optionlist prior to ippool invocationCy Schubert2025-11-261-0/+3
| | | | | | | | | | | | | As a safety precaution df381bec2d2b limits ippool hash table size to 1K. This causes any legitimely large hash table to fail to load. The htable_size_max ipf tuneable adjusts this but the adjustment is made in the ipfilter rc script, invoked after the ippool script (because it depends on ippool). Let's load the ipfilter_optionlist in ippool as well. ipfilter_optionlist load will also occur in the ipfilter rc script in case the user uses ipfilter without ippool. Fixes: df381bec2d2b MFC after: 3 days
* Add description of the LD_DEBUG environment variable.George V. Neville-Neil2025-11-251-1/+6
|