[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 11 Nov 2023 19:59:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275031
Bug ID: 275031
Summary: rc.d/ldconfig missing hard-coded /lib/casper from
rtld-elf STANDARD_LIBRARY_PATH
Product: Base System
Version: 13.2-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: conf
Assignee: bugs@FreeBSD.org
Reporter: john@saltant.com
Created attachment 246246
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=246246&action=edit
stable/12: Prepend /lib/casper to rc.d/ldconfig's baseline
Synopsis
========
ldconfig manages the file at _PATH_ELF_HINTS and always includes a baseline set
of directories independent of its rc vars such as ldconfig_paths and
ldconfig_local_dirs. After consulting the hints, rtld falls back to a
hard-coded list of library directories. The ldconfig hard-coded path is a
subset of the rtld hard-coded path whereas they should be identical.
Context
=======
% ldd /usr/local/sbin/tcpdump | grep libcap_dns
libcap_dns.so.2 => /lib/casper/libcap_dns.so.2 (0x21349571a000)
% /usr/local/sbin/tcpdump --version
tcpdump version 4.99.4
libpcap version 1.10.4
OpenSSL 1.1.1w 11 Sep 2023
%
Expected behavior
=================
% sudo pkg check -B tcpdump
Checking tcpdump: 100%
%
Observed behavior
=================
% sudo pkg check -B tcpdump
Checking tcpdump: 0%
(tcpdump-4.99.4_1) /usr/local/sbin/tcpdump - required shared library
libcap_dns.so.2 not found
Checking tcpdump: 100%
%
Analysis
========
The "pkg check -B" command has no hard-coded default path and relies on the
elf-hints maintained by ldconfig. The ldconfig baseline (_LDC) is set to "/lib
/usr/lib" in libexec/rc/rc.d/ldconfig on the (still supported) stable/12 and
stable/13 branches. The rtld baseline (STANDARD_LIBRARY_PATH) is set to
"/lib/casper:/lib:/usr/lib" in libexec/rtld-elf/paths.h on the stable/12 branch
and in libexec/rtld-elf/rtld_paths.h on the stable/13 branch. Considering rtld
to be authoritative, ldconfig's baseline needs correction.
The main and stable/14 branches are not affected because the casper shared libs
have been moved to /lib, so the rtld and ldconfig baselines agree.
See also
========
https://lists.freebsd.org/archives/freebsd-ports/2023-November/004889.html
Testing
=======
% echo /lib/casper |
sudo tee /usr/local/libdata/ldconfig/casper > /dev/null
% sudo service ldconfig restart
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
/usr/local/lib/compat/pkg /lib/casper /usr/local/lib/compat/pkg
/usr/local/lib/perl5/5.36/mach/CORE /usr/local/llvm15/lib
32-bit compatibility ldconfig path: /usr/lib32
% sudo pkg check -B tcpdump
Checking tcpdump: 100%
--
You are receiving this mail because:
You are the assignee for the bug.