aboutsummaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* rtld: Define MD_OBJ_ENTRY for mipsJessica Clarke2024-07-311-0/+2
| | | | | | | This is a direct commit to stable/13. Reported by: mmel Fixes: f9210d37c5c6 ("rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry")
* rc.conf: Leap-seconds sources: Add IANA backCy Schubert2024-07-221-1/+1
| | | | | | | | | | | | 11da791920ba switched Leap-seconds source from IANA to IERS, as IERS is the canonoical source. The problem ist that IERS is not accessible from IPv6 only networks. To work around this we must add IANA back in order to provide IPv6-only users a source for leap-seconds fetch. PR: 279413 Fixes: 11da791920ba (cherry picked from commit 66f360515d2829d261c0ad7bd516e9dd18c2dd83)
* rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_EntryAndrew Turner2024-07-158-0/+16
| | | | | | | | | | | Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45116 (cherry picked from commit 06db20ffeca9898e5802d63f3b06caaa37c3a4ed)
* rc.subr: improve description for ${name}_offcmdEugene Grosbein2024-06-211-1/+2
| | | | | | Clarify that ${name}_offcmd is for method start. (cherry picked from commit af1b0aa5b957bbfedc929167aa3459ad2d8b6653)
* rc.subr(8): MFC: introduce ${name}_offcmdEugene Grosbein2024-06-172-8/+24
| | | | | | | | | | | | | | | | New variable ${name}_offcmd may be used to supply commands executed if named service is not enabled. Previously start_precmd could be used for such a task but now rc.subr(8) does not call it if a service is not enabled. Fix devd startup script to use it instead of start_precmd. PR: 279198 Reported by: Dmitry S. Lukhtionov Tested by: Dmitry S. Lukhtionov (cherry picked from commit 32a579e4fc69a65e8901111ad5f65ec56a97dfab) (cherry picked from commit c2db3a0c7d31116028b38b426a9b139d26cbc7e5)
* tftpd: Add missing `-S` option to synopsis.Dag-Erling Smørgrav2024-05-141-3/+3
| | | | | | | | | MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D45129 (cherry picked from commit 816c4d3dcf99adcd40a03d93431237ddbd23bbdf)
* rtld.1: clarify interaction between -u and -oKonstantin Belousov2024-05-071-1/+3
| | | | (cherry picked from commit 6a7819e43f938992304472054c83f4a6602a9e19)
* rtld direct exec: make -u behavior match the descriptionKonstantin Belousov2024-05-071-1/+4
| | | | (cherry picked from commit ef2694f368cee5957ee44b0298da88ff8360d561)
* rtld: add direct-exec option -oKonstantin Belousov2024-05-072-1/+49
| | | | (cherry picked from commit d1cd0cc32b53c09e72e33116b94a5b0b9781a183)
* rtld snprintf: do not erronously skip a char at the buffer boundaryKonstantin Belousov2024-05-031-4/+3
| | | | (cherry picked from commit 56ee5fc43c40479e2651b21862e299bcf73017ae)
* kdc: Add restart optionCy Schubert2024-04-292-2/+29
| | | | | | | | | | | | | | | | | | Add a new kdc_restart rc variable that manages kdc (or krb5kdc) under daemon(8). This automatically restarts the kdc should it fail, i.e. when it's configured to use LDAP as a backend and cannot connect to its LDAP directory. Set kdc_restart="YES" to auto restart kdc on abnormal termination. Set kdc_restart_delay="N" to the number of seconds to delay before restarting the kdc. The daemon(8) default seconds applies when not set. Reported by: Lexi Winter <lexi.freebsd@le-fay.org> PR: 278395 Differential Revision: https://reviews.freebsd.org/D44898 (cherry picked from commit 9e248b7f645cdf05615a49cc15295df49b54d659)
* rtld(1): minor clarification for LD_STATIC_TLS_EXTRAKonstantin Belousov2024-04-231-2/+5
| | | | (cherry picked from commit 8d7473703520f315c1bcd3b3d12498eee10d563e)
* rtld: introduce STATIC_TLS_EXTRAStephen J. Kiernan2024-04-2310-12/+35
| | | | (cherry picked from commit 95335dd3c19e0ade161bb4dc8462fc3d045ce4f8)
* dma.conf: Fix typoMikael Urankar2024-04-091-1/+1
| | | | | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/1150 (cherry picked from commit c92400a6f690a82ab84eb0b97cc8bf169e44e4e8) (cherry picked from commit bedc8daace2692efa9aad232c3eeff61f2c954c9)
* rtld-elf: support either byte-order of hints fileStefan Eßer2024-03-291-16/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept either little-endian or big-endian representation of the ELF hints magic number in the header of a hints file and convert the parameters to the native byte-order of the repsective system. This is a pre-requisite for a planned change to always write the byte order in little-endian format on all architectures. The only relvant architecture that uses big-endian data is powerpc64, and it is not likely that new architectures will choose that representation of data in memory. When all supported architectures use little-endian data in the hints file, the byte swap logic can be enabled for big-endian CPUs at compile time. Up to that point, there is a very small run-time penalty that is paid on all systems to check the byte-order of the hints file and to provide the option to byte-swap the parameters read from the hints file header. This commit contains the changes from review D44080 (which had been split off from this patch for easier review), Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44053 (cherry picked from commit 7b77d37a561b47db093a2528b8032dbfe5791698) rtld-elf: add some debug print statements The byte-order independent code has been reported to fail on powerpc64. Add some more debug statements to help identify the parametrs used and to verify the correct operation of the byte-swap macros used.. (cherry picked from commit 173953182af060dcab43990e179ee91e9f2d1e54) rtld: fix check for endianess of elf hints file Don't check if the elf hints file is in host byte order, but check if it is in little endian by looking at the magic number. This fixes rtld on big endian platforms. Reviewed by: se, kib (prior version of the patch) Fixes: 7b77d37a561b ("rtld-elf: support either byte-order of hints") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44472 (cherry picked from commit da2d6e2815d7694e3ccbd561508074c547b02dd6) rtld: reduce debug messages after fix on big-endian hosts Remove a debug message that had been added to support the debugging of a mis-detection of the hint files endianness on powerpc64. MFC after: 3 days (cherry picked from commit c44bf7d2e9d2292867f2e23f291266af26762354)
* rtld: add some dlopen testsKyle Evans2024-03-182-0/+54
| | | | | | | | | | | | | | | | | | dlopen_basic just tests that libthr.so can be dlopen()ed, which will just serve as a sanity check that "libthr.so" is a thing that can be dlopened in case we get a weird failure in dlopen_recursing. dlopen_recursing tests a regression reported after the libsys split, where some dlopen() may cause infinite recursion and a resulting crash. This case is inspired by bdrewery's description of what seemed to be causing his issue. The corresponding fix landed in commit 968a18975ad ("rtld: ignore load_filtees() calls if we already [...]") Reviewed by: kib (cherry picked from commit c5796f1572c82b88e8b6a2810c92f30e5ac3e118)
* rtld: use generated map file to check for some leaks from libc into rtldKonstantin Belousov2024-03-061-0/+19
| | | | (cherry picked from commit 5db5c6c87a75f8b1871f021726fc4697253ae5cf)
* rtld: unconditionally generate map file during buildKonstantin Belousov2024-03-061-0/+6
| | | | (cherry picked from commit 799940154c70597a46627deb4d0b98e174b27b98)
* rtld: remove pointless "extern"Konstantin Belousov2024-02-291-1/+1
| | | | (cherry picked from commit 180df764c4ee570850deb4a910a11780ec3316df)
* fdlopen(3): do not create a new object mapping if already loadedKonstantin Belousov2024-02-291-2/+3
| | | | | | PR: 277169 (cherry picked from commit 452c5e9995ab4cd6c7ea230cffe0c53bfa65c1ab)
* rtld: ignore load_filtees() calls if we already loading filtees for the objKonstantin Belousov2024-02-292-1/+4
| | | | (cherry picked from commit 968a18975adc9c2a619bb52aa2f009de99fc9e24)
* rtld load_filtees(): reindent and reduce block nestingKonstantin Belousov2024-02-291-3/+2
| | | | (cherry picked from commit 30b5f6b33b35623e6b6aa1d27a78311e199fa602)
* rtld-elf: Avoid unnecessary lock_restart_for_upgrade() callsMark Johnston2024-02-291-1/+1
| | | | (cherry picked from commit e7951d0b04e6464b37264b8166b1e9ce368a9f1d)
* rtld symlook_obj: move common code to check filtees into helperKonstantin Belousov2024-02-291-12/+19
| | | | (cherry picked from commit 9ea864b54b57f2d0125860fb923f8db52b20eac2)
* leapseconds: Update to the canonical place.Warner Losh2024-02-081-2/+2
| | | | | | | | | | | | | | | | | | | IERS is the source of truth for leap seconds. Their leapsecond file is updated most quickly and is always right (unlike the IANA one which often lags). IERS operates this public service for the express purpose of random people downloading it. Their terms of service are compatible with open source (we could include this in our release). Rather than fighting with questions around this because the IANA one changed locations or the auto update script broken, just use this. This is in preference to the NIST ftp copy. NIST is in the process of retiring their FTP services. Sponsored by: Netflix Reviewed by: philip, delphij, cy Differential Revision: https://reviews.freebsd.org/D43752 (cherry picked from commit 11da791920ba285f0832f09cb504ac81e35ff8d1)
* rc.d/kdc: Support start of MIT krb5kdcCy Schubert2024-01-291-6/+4
| | | | | | | | | | | | | | | | | Some users wishing to use the MIT krb5kdc have discovered the kdc script workaround applied to the MIT krb5 ports is insufficient. Let's build into this rc script the smarts to determine whether base or ports Hiemdal kdc is being invoked or the MIT krb5kdc. While at it, remove kdc_start_precmd(). This will simplify a future jail patch. Suggested by: netchild Original patch: netchild Reviewed by: emaste, netchild Differential Revision: https://reviews.freebsd.org/D43523 (cherry picked from commit 91f78c32befa08bf4010db7afd4407277a3e585f)
* bootpd(8): Fix a typo in a source code commentGordon Bergling2024-01-251-1/+1
| | | | | | - s/adddress/address/ (cherry picked from commit d04df664776b436f712051520d48f84be93ab269)
* Stop #defining FREEBSD_ELFJohn Baldwin2024-01-051-1/+1
| | | | | | | | | | | | | | This was originally used (along with FREEBSD_AOUT) to prefer the use of ELF in various tools instead of a.out as part of the a.out to ELF transition in the 3.x days. The last use of it was removed from <link.h> in commit 66422f5b7a1a6055f0b2358268eb902aab6e2e3e back in 2002, but various files still #define it. Reviewed by: kevans, imp, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42964 (cherry picked from commit 4a3cf5f329d69076aa9d093d596eb0ee82d917f5)
* rc.conf: correct $ntp_leapfile_sourcesPhilip Paeps2023-12-161-1/+1
| | | | | | | | IETF is no longer serving leap-seconds.list. Point at IANA instead. This fixes "service ntpd fetch". (cherry picked from commit b1c95af45488bef649e9a84890e2414ff80b3a00)
* rtld: add a test for RTLD_DEEPBINDKyle Evans2023-12-1510-2/+177
| | | | | | | | | | | | | | | This tests that with RTLD_DEEPBIND, symbols are looked up in all of the object's needed objects before the global object. ATF_REQUIRE_INTEQ was added after stable/13 branched, so we shim it out here. PR: 275393 Reviewed by: kib Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit d9c543b6b0cabea6e6679d70b4e701018e7eab80)
* RTLD_DEEPBIND: make lookup not just symbolic, but walk all refobj' DAGsKonstantin Belousov2023-12-072-2/+7
| | | | | | PR: 275393 (cherry picked from commit 9daf6cd0f46416d9c6eb0411ea6042cd42b8a9bc)
* rc.conf(5): add <service>_umask to run the service using this valueEugene Grosbein2023-12-021-1/+9
| | | | | | | | | | | | None of tools working with login classes change umask(1) and we had no ways to specify non-default umask for a service not touching its startup script. This change makes in possible. Some file-sharing services that create new files may benefit from it. Differential: https://reviews.freebsd.org/D36309 (cherry picked from commit 160a2f2cdda806e104c0d3194bfb84b208ad1ae8)
* rc: add ${name}_setup script supportFranco Fichtner2023-12-021-3/+11
| | | | | | | Run a service-based setup script before running the start command. Useful for automatic configuration file generation. Reviewed by: https://reviews.freebsd.org/D36006
* ldconfig: filter out non-existing directories from default pathKonstantin Belousov2023-11-281-1/+5
| | | | (cherry picked from commit 806e4e3273bee2e3a12ffc2e74db5c912fbd7aa9)
* rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_pathsJohn W. O'Brien2023-11-281-1/+4
| | | | | | PR: 275031 (cherry picked from commit 99132daf6f70cb0cc969c555d3612547fa3cf1db)
* Purge more stray embedded $FreeBSD$ stringsJohn Baldwin2023-10-2429-91/+0
| | | | | | | | | These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 (cherry picked from commit eba230afba4932f02a1ca44efc797cf7499a5cb0)
* rc.subr: Fix a typoMateusz Piotrowski2023-10-041-1/+1
| | | | | | MFC after: 3 days (cherry picked from commit 7f6754d9659183a0c56fe76044d7826ca849675f)
* rc: Start testing the rc(8) framework (beginning with *_oomprotect)Mateusz Piotrowski2023-10-043-0/+109
| | | | | | | | | | | | | | | This change adds 2 tests to make sure that the *_oomprotect variable sets the protection against OOM killer properly within rc(8) scripts. This is also adding the first tests for the rc(8) framework. More tests will be added as we go. PR: 256148 Approved by: des MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35745 (cherry picked from commit e7437ae907c89bf85a99c5cbb7ddd194a1ff1354)
* rc.d/hostid: remove useless catнаб2023-09-241-1/+1
| | | | | | | We've already read it and validated it ‒ re-reading is wasteful PR: 264376 (cherry picked from commit 11bd40d04af59daa7ae7feea0518081a35f07053)
* rc.subr: don't require service to be enabled for `status`Daniel Tameling2023-09-241-2/+3
| | | | | | | | | | | | | | | | For a service that sets an rcvar, there is a check whether it has been enabled before the actual command is executed. If the check fails, one gets a message to enable it and the returned exit status is 0. However, this is usually undesirable for the status command, which is a) supposed to check whether the service is running anyway and b) returns a non-zero exit code if that is not the case. Thus, skip the check for the status command. PR: 272282 Reviewed by: emaste (cherry picked from commit ba793728a840041e93e38bcbff4a7233dc63b722) (cherry picked from commit f701d9da1d94891dd2edad607a989cad6eb10313)
* rtld: output rtld errors into the dbg channelKonstantin Belousov2023-09-191-0/+1
| | | | (cherry picked from commit 72d97e1dd9cc72a2acb96e35e56db6f3f51bca7d)
* ftpd: add deprecation noticeEd Maste2023-09-141-1/+11
| | | | | | | | | | | Approved by: gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26447 (cherry picked from commit 98b98ec1bc7e961c3d3468b0e481080580c902cf) (cherry picked from commit cc9347cc79d320cac00ccf5d5f23971de2c887a1) (cherry picked from commit 01d82151022cb1383e83c331708a787f1907b00f) (cherry picked from commit 3ea83e94cdfa34745641dfa5f43debfdcd79e229)
* __crt_aligned_alloc_offset(): fix ov_index for backing allocation addressKonstantin Belousov2023-09-091-1/+1
| | | | (cherry picked from commit 03a7c36ddbc0ddb1063d2c8a37c64d83e1519c55)
* rc.d/routing: Correct setting default gateway for each FIBAndrew Fengler2023-08-301-3/+3
| | | | | | | | | | | | | There was a mistake in the previous commit, it used the incorrect spelling of the FIB variable name and was not functional Also corrects an issue with the IPv6 default route variable name. Fixes: 30659d1dcbcc ("Add support for adding default routes for other FIBs") Sponsored-by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D37685 (cherry picked from commit f81be7a8318b178e406c12d98f78cfa2a4229af7)
* rtld: switch from malloc_aligned() to __crt_aligned_alloc()Konstantin Belousov2023-08-283-32/+15
| | | | (cherry picked from commit feaae6ba1ace0091384ac371423976cd15e59e5a)
* rtld_malloc: add __crt_aligned_alloc_offset()Konstantin Belousov2023-08-282-3/+32
| | | | (cherry picked from commit c29ee08204ce4106d4992474005c5f2fb7d5fbf1)
* rtld_malloc: increase overhead index to uint16Konstantin Belousov2023-08-281-2/+2
| | | | (cherry picked from commit d60130bf32a3c35417f276507dcdfa569397dae3)
* rtld_malloc.c: change return type of cp2op() to voidKonstantin Belousov2023-08-281-2/+2
| | | | (cherry picked from commit 6bb7f05850efceb01a7050e3c0fd86f9539c0071)
* rtld: unlock bind lock when calling into crt __pthread_distribute_static_tls ↵Konstantin Belousov2023-08-271-0/+2
| | | | | | method (cherry picked from commit b1d3e2b771552af071bf0964233cc5a76ea25542)
* Fix partially removed comment by removing the restWarner Losh2023-08-231-2/+0
| | | | | Fixes: 2a63c3be1582 (cherry picked from commit ddb5480ec67a44a28316724397fd6609354c4558)