aboutsummaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
...
* testing: move atf-pytest-wrapper to /usr/libexecAlexander V. Chernikov2022-06-263-1/+203
| | | | | | | | | | | Move pytest wrapper to the collection of the other atf wrappers in libexec. It solves the problem of combining bits & pieces from bsd.test.mk and bgs.prog.mk to address "test binary, but not the suite binary". Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D35604 MFC after: 2 weeks
* rc.d/hostid: remove useless catнаб2022-06-181-1/+1
| | | | | | We've already read it and validated it ‒ re-reading is wasteful PR: 264376
* rc.d/ntpd: Restart ntpd when resuming from sleep.John Baldwin2022-06-141-2/+8
| | | | | | | | | | ntpd does not always gracefully handle clock steps during resume. This is probably most useful in conjunction with ntpd_sync_on_start=YES which will work around any clock skew while suspended. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D35479
* rc.d/wpa_supplicant: Remove the sleep to improve boot timeCy Schubert2022-06-141-1/+0
| | | | | | | | | | | | bapt@ had discovered a noticeable boot improvement without the sleep. Without the sleep does not affect warm or cold boot however a service netif restart may cause dhclient to spend a few extra seconds to rerequest the DHCP request. Reported by: bapt Reviewed by: bapt MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D35457
* rc.d/wpa_supplicant: remove support for NDISBaptiste Daroussin2022-06-111-10/+0
| | | | ndis drivers have been remove long ago (early 2021)
* ftpd(8): do not refer to now unused libxo(3)Eugene Grosbein2022-06-102-2/+1
| | | | | | | | | | In 2018, the commit r328100 (0fdf7fa846b1a1b1679e86812a1b08b8cb623604) removed libxo(3) support from ls(1), so ftpd has no reasons to link with libxo since then. ls(1) does not depend on libxo in both of stable/12 and stable/13. MFC after: 2 weeks
* rc: Fix quoting in the zpoolreguid scriptMark Johnston2022-05-311-1/+1
| | | | | | Reported by: 0mp Fixes: 227caacc918a ("rc: Add a zpoolreguid rc.d script") Sponsored by: The FreeBSD Foundation
* rc: Add a zpoolreguid rc.d scriptMark Johnston2022-05-303-0/+28
| | | | | | | | | | | | | | | | If one boots up multiple copies of a template VM image containing a zpool, the pool GUIDs will be identical, making it impossible to, e.g., share datasets between them. This diff introduces a simple workaround for the problem: one can use the script to, upon first boot, assign a new GUID to one or more zpools. This will be useful when building ZFS-based VM images from release(7). Reviewed by: mav, allanjude, asomers Reviewed by: Pau Amma (docs) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35336
* libexec/rc.d/hostapd: Down/up interface when interface is specifiedCy Schubert2022-04-221-3/+5
| | | | | | | | | | | When no interface is specified results in a syntax error in the rc script. Only execute poststart when an interface has been specified. PR: 263358 Submitted by: markj Reported by: Joshua Kinard <freebsd@kumba.dev> Fixes: 0da2c91e64528d896f69d36670e25b4b4a140579 MFC after: 3 days
* Have rtld query the page size from the kernelAndrew Turner2022-04-074-58/+58
| | | | | | | | | To allow for a dynamic page size on arm64 have the runtime linker query the kernel for the currentl page size. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34765
* rtld: trace preloaded objectsKonstantin Belousov2022-04-011-6/+23
| | | | | | | | | | | | | | | | | | | Before, preloaded objects, if not listed as needed for any normally linked objects, were silently ignored. Preloaded objects are printed with the `[preloaded]` herald. The list includes the objects not listed explicitly as recursive dependencies of the main object, effectively dsos loaded by LD_PRELOAD mechanism. vdso is listed as well, since it is not needed by anything. Since there is no DT_NEEDED entry for LD_PRELOADed objects, they are usually printed using LD_TRACE_LOADED_OBJECTS_FTM2 format due to the failure of the heuristic based on the presence of the 'lib' prefix. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34716
* rtld trace_loaded_objects(): use bool for the list_containers variableKonstantin Belousov2022-04-011-2/+3
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34716
* rtld: use style(9) for trace_loaded_objects()Konstantin Belousov2022-04-011-21/+22
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34716
* rtld: extract printer for a single traced object into a helperKonstantin Belousov2022-04-011-60/+58
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34716
* rtld: extract calculation of the format strings for trace into a helperKonstantin Belousov2022-04-011-10/+17
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34716
* zfskeys: Support autoloading of keys stored on ZFSMateusz Piotrowski2022-03-181-0/+12
| | | | | | | | | | | | | | | | | | | | | The zfskeys service script starts before the zfs service script, so that dataset decryption keys are available when `zfs mount -a` is run. One of the potential edge cases of this design is that if a key is stored on ZFS it won't be loaded until `zfs mount -a` is issued. In order to address that let's try to load the additional keys and mount related ZFS datasets after the zfs script finishes its standard mounting procedure. PR: 262468 Reported by: Graham Perrin <grahamperrin@gmail.com> Reviewed by: allanjude Approved by: allanjude (src) Fixes: 33ff39796ffe Add zfskeys rc.d script for auto-loading encryption keys MFC after: 3 days Sponsored by: Modirum Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D34601
* rc.d: Chmod +x all the scripts for consistencyMateusz Piotrowski2022-03-178-0/+0
| | | | | | | Reviewed by: lwhsu Approved by: lwhsu (src) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D34589
* rc.d/*: Use startmsg instead of echo on start messagesJose Luis Duran2022-03-136-18/+18
| | | | | | | | | | | | By rc.conf(5), setting rc_startmsgs="NO" should silence start messages. Fix a few rc scripts by using startmsg. PR: 255207 Reported by: Jose Luis Duran <jlduran@gmail.com> Reviewed by: imp, 0mp Approved by: imp (src) Differential Revision: https://reviews.freebsd.org/D34514
* Introduce startmsg and use it in rc scriptsJose Luis Duran2022-03-1315-28/+35
| | | | | | | | | | | | | | | | | | | | | | startmsg is a new rc.subr(8) function function to be used instead of echo(1) when for boot messages. It replaces the often forgotten check_startmsgs && echo ... with startmsg ... No functional change intended. I adjusted the commit message and did some final clean-ups of the patch before committing. PR: 255207 Reported by: Jose Luis Duran <jlduran@gmail.com> Reviewed by: imp, 0mp Approved by: imp (src) Differential Revision: https://reviews.freebsd.org/D34514
* dumpon: use underlying device if encrypted swap is in useEd Maste2022-03-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | /etc/rc.d/dumpon runs before /etc/rc.d/swap. When encrypted swap is in use the .eli or .bde device will not exist at the time dumpon runs. Even if this is addressed it does not make sense to dump core to encrypted swap, as the encryption key will not be available after reboot rendering the dump useless. Thus, for the case that dumpdev=AUTO and encrypted swap is in use, strip the extension and use the underlying device. Emit a warning if we are using the underlying device and the user has not configured dump encryption, so that the user knows that the will not be encrypted. PR: 238301 Reported by: Ivan Rozhuk Reviewed by: jilles MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34474
* rc.d/ggated: Simplify service scriptMateusz Piotrowski2022-03-042-6/+4
| | | | | | | | | | | | | | - Use the standard *_flags variable for additional flags. - Style: do not create unnecessary variables - Do not set the defaults in the service script. This is what /etc/defaults/rc.conf is for. - Do not set additional flags via commands_args. ggated_flags are already included in the final invocation. See rc.subr(8) for details. - Document the meaning of ggated_config in /etc/defaults/rc.conf. Approved by: eugen (src) Fixes: c068632981eb Add ggated rc script Differential Revision: https://reviews.freebsd.org/D34439
* Add ggated rc scriptAlan Somers2022-02-283-0/+25
| | | | | | Reviewed by: asomers, peterj Submitted by: Johannes Totz <jo@bruelltuete.com> Differential Revision: https://reviews.freebsd.org/D31709
* rtld.1: Fix misplaced textJohn F. Carr2022-02-251-4/+4
| | | | | | PR: 262194 Fixes: f90218886fc8 ("rtld: introduce PRELOAD_FDS") MFC after: 3 days
* rc.subr: boottrace annotationsMitchell Horne2022-02-221-1/+28
| | | | | | | | | | | When enabled, have the framework use the boottrace(8) utility to execute each rc script, generating trace entries for the entire suite of scripts. Reviewed by: 0mp (slightly earlier version) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31930
* gssd: Modify /etc/rc.d/gssd so that it starts after NETWORKINGRick Macklem2022-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | Arno Tuber reported via email that he needed to restart the gssd daemon after booting, to get his Kerberized NFS mount to work. Without this patch, rcorder shows that the gssd starts before NETWORKING and kdc. The gssd will need NETWORKING to connect to the KDC and, if the kdc is running on the same system, it does not make sense to start it before the kdc. This fixed the problem for Arno. While here, I also added a "# BEFORE: mountcritremote". It does not affect ordering at this time, but I felt it should be added, since the gssd needs to be running when remote NFS mounts are done. PR: 261939 Reported by: anothatuber@gmail.com Tested by: anothatuber@gmail.com Reviewed by: rew MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34265
* rtld: Add ${TOKEN} aliases to $TOKENKonstantin Belousov2022-02-111-0/+4
| | | | | | | | | | | it seems that glibc supports them, and such spelling is mentioned in the ld.bfd manual. Idea seems to auto-correct some quoting/makefile sytnax errors on linker command line. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34247
* rtld: make token substitution table-drivenKonstantin Belousov2022-02-111-7/+20
| | | | | | | Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34247
* rc: Allow the removal of firstboot_sentinel on read-only file systemsJose Luis Duran2022-02-101-1/+1
| | | | | | | | | | | | | | | | | NanoBSD or, more generally, systems with root_rw_mount="NO" are not able to remove the firstboot_sentinel file, typically /firstboot, because the logic in /etc/rc is currently inverted. When checkyesno root_rw_mount tests on a read-only file system, the return is 1, hence avoiding the option to mount the system read-write. Restore the ability to remove the firstboot_sentinel file on read-only mounted file systems. This change was introduced in 40adda8665bb, and partially fixed in 1ce07411fae8. Differential Revision: https://reviews.freebsd.org/D34166
* rc: Remove extra whitespaceJose Luis Duran2022-02-101-3/+3
| | | | Differential Revision: https://reviews.freebsd.org/D34165
* rtld: Fix assertion I broke.John Baldwin2022-01-271-1/+1
| | | | | | | | textrel is a bool, not a pointer. Pointy hat to: jhb Reported by: kevans Fixes: 6a2d75d24857 rtld: Trim a few more MIPS #ifdefs.
* rtld: Trim a few more MIPS #ifdefs.John Baldwin2022-01-271-6/+1
| | | | | | Reviewed by: imp, kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D34052
* mountd: Delay starting mountd until after mountlateRick Macklem2022-01-233-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR#254282 reports a problem where nullfs mounts cannot be exported via mountd for FreeBSD 13.0. The problem seems to be that, to do the nullfs mounts in /etc/fstab, they require the "late" mount option, so that the underlying filesystem is mounted (ZFS for the PR). Adding "mountlate" to the REQUIRE list in /etc/rc.d/mountd fixes the problem, but that results in a dependency cycle because /etc/rc.d/lockd specifies: REQUIRE: nfsd BEFORE: DAEMON --> which forces mountd to preceed DAEMON. This patch removes "nfsd" from REQUIRE for lockd and statd, then adds mountlate to REQUIRE for mountd, to fix this problem. Having lockd REQUIRE nfsd was done in the NetBSD code when it was pulled into FreeBSD and there does not seem to be a need for this. In case this causes problems, a long MFC has been specified. PR: 254282 Differential Revision: https://reviews.freebsd.org/D33256 MFC after: 3 months
* etc/defaults/rc.conf: set default of zfskeys_enable to NORobert Wing2022-01-181-0/+1
| | | | | | | | | | | This addresses the following boot message: /etc/rc: WARNING: $zfskeys_enable is not set properly - see rc.conf(5). Reported by: Mark Millard Sponsored by: Modirum MDPay Sponsored by: Klara Inc. Fixes: bfb7a31b6a22 ("rc: Hook zfskeys to the build") Fixes: 33ff39796ffe ("Add zfskeys rc.d script for auto-loading encryption keys")
* rc.d/ntp: Ensure ntpd.leap-seconds.list is readable by ntpdCy Schubert2022-01-181-0/+2
| | | | | | | | | | | | | When a use sets umask in login.conf(5) to 027 or 077 a subsequently fetched /var/db/ntpd.leap-seconds.list will inherit the permissions allowed by the umask, resulting in a file that may not be readable ntpd running under the ntp account. This patch adds a umask command to preempt the umask in login.conf(5) prior to fetching a new copy of the leap-seconds file. PR: 261298 Reported by: Martin Waschbusch <martin@waschbuesch.de> MFC after: 3 days
* rtld-elf: Remove libsoft supportWarner Losh2022-01-073-52/+0
| | | | | | Remove support for loading libsoft libraries. Sponsored by: Netflix
* libsoft: Remove runtime ldconfig support for libsoftWarner Losh2022-01-072-27/+0
| | | | | | | Remove the runtime support for running ldconfig at boot to cache lists of libsoft libbraries. Sponsored by: Netflix
* Restore DT_DEBUG processingKonstantin Belousov2022-01-061-0/+6
| | | | | | Pointed out by: kevans Fixes: 292cba9b4919ee188ca08cc8bf5057e346514383 Sponsored by: The FreeBSD Foundation
* rtld: remove mips arch directoryKonstantin Belousov2022-01-064-1158/+0
| | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D33763
* rtld: remove mips-specific cases from generic codeKonstantin Belousov2022-01-062-53/+0
| | | | | | Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D33763
* pkgbase: Create a FreeBSD-ftpd packageEmmanuel Vadot2021-12-211-0/+2
| | | | | | | | And put ftpd into it. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33453
* pkgbase: Create a FreeBSD-tcpd packageEmmanuel Vadot2021-12-211-0/+2
| | | | | | | | | And put the tcp-wrapper utilities in it. Reviewed by: emaste MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33439
* pkgbase: Put more binaries/lib in runtimeEmmanuel Vadot2021-12-211-0/+2
| | | | | | | | | Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime. This is everything needed to boot to multiuser with FreeBSD-rc installed. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33435
* pkgbase: Put yellow pages programs to its own packageEmmanuel Vadot2021-12-211-0/+1
| | | | | | | | | YP is less and less used, split them to users have the choice to not install them. MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33441
* hostapd: Fix wlan interfaces not UP/RUNNINGCy Schubert2021-12-141-0/+7
| | | | | | | | | Like wpa_supplicant, hostapd does not automatically UP the interface when configured. The fix is similar to 5fcdc19a8111. Reported by: avg Tested by: avg MFC after: 1 week
* rc: network.subr improve network6_getladdr()Bjoern A. Zeeb2021-12-131-1/+1
| | | | | | | | | | In network6_getladdr() we are iterating over inet6 lines and are not interested in any others. So tell ifconfig to limit output to "inet6" as much as possible. This is probably a micro-optimisation but was noticed while looking at other IPv6-related boot-time improvements. MFC after: 1 week
* TLS: Use <machine/tls.h> for libc and rtld.John Baldwin2021-12-0919-96/+48
| | | | | | | | | | | | | | | | | | | | | | | | - Include <machine/tls.h> in MD rtld_machdep.h headers. - Remove local definitions of TLS_* constants from rtld_machdep.h headers and libc using the values from <machine/tls.h> instead. - Use _tcb_set() instead of inlined versions in MD allocate_initial_tls() routines in rtld. The one exception is amd64 whose _tcb_set() invokes the amd64_set_fsbase ifunc. rtld cannot use ifuncs, so amd64 inlines the logic to optionally write to fsbase directly. - Use _tcb_set() instead of _set_tp() in libc. - Use '&_tcb_get()->tcb_dtv' instead of _get_tp() in both rtld and libc. This permits removing _get_tp.c from rtld. - Use TLS_TCB_SIZE and TLS_TCB_ALIGN with allocate_tls() in MD allocate_initial_tls() routines in rtld. Reviewed by: kib, jrtc27 (earlier version) Differential Revision: https://reviews.freebsd.org/D33353
* amd64: Allocate TCB with alignment of 16 rather than 8.John Baldwin2021-12-091-1/+1
| | | | | | | | This matches the TLS_TCB_ALIGN definition in libc. Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33349
* mips: Add TLS_DTV_OFFSET to the result of tls_get_addr_common.John Baldwin2021-12-091-3/+2
| | | | | | | | | | Previously TLS_DTV_OFFSET was added to the offset passed to tls_get_addr_common; however, this approach matches powerpc and RISC-V and better matches the intention. Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33347
* mips: Rename TLS_DTP_OFFSET to TLS_DTV_OFFSET.John Baldwin2021-12-092-3/+2
| | | | | | | | | | | This is the more standard name for the bias of dtv pointers used on other platforms. This also fixes a few other places that were using the wrong bias previously on MIPS such as dlpi_tls_data in struct dl_phdr_info and the recently added __libc_tls_get_addr(). Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33346
* rtld: load preloaded vdsoKonstantin Belousov2021-12-061-0/+79
| | | | | | | | | Reviewed by: emaste Discussed with: jrtc27 Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D32960