From nobody Sat Nov 11 19:59:19 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSRNS05Vpz511rw for ; Sat, 11 Nov 2023 19:59:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SSRNR2gH8z3LvW for ; Sat, 11 Nov 2023 19:59:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699732759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bzk0Y16/dE2Z70e9CCftfkYVYBJvovUTh3qlAjTh7QQ=; b=EdPlIg7YVpoCDUdOWLeCTI8FQZ4GujwsmDO9nUKSjfYBczuEojVvRzUBwifrCDkqeGedAX 9eSEnRGb/nKvn6HCfKpquJhVb2MBKHUjJG9xvp+Gopmk4aK0ZBLKSv2Q6nJr7t4cOSZ9mZ 1aDRYs+pGeri+khG2tmXQdKchCTpcnGIqm67YMNRMqR3LJXrHpfXEiNQkF1WH6HjLx1+qF R8U39E8FvqrIZIWuwTcBebVDL9nJKM5uWaLhl9S5SrYW29RRP02AgXF4i45LYUA5JcHfbg ZjL6L68X7zjL737axXTAHgM0QD1fmcrGfudaTGAqgJ7WBEykwi3yhKrHHow+ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699732759; a=rsa-sha256; cv=none; b=mZLhhvOZ744mVxg/UlzTAZwclwTlduhvnYX77T8hzGFp8rH/I5ptgCt5lZLShmsyPEc2Mr wkLXU7ZNpeHkJxTsgegsDkd9Xqr9xidcQplkx9B80YIwBy92aLxrBVOngoylt+dJBSaIB5 vxGUWNNhZT3Aewj7KmKya29rUh9MIZpLebECWkE9U0TkfIx8MXixyzJSDuSdfhbAzbnW/W ycldBhGIGwXeMpgJwFwfI/XVfcGdZKoxOUUmVRlWP9gnbpVl6YAU+4N347MLBQPRAZySGB 6ithskH8IkNGfLBgIFE6j5WObH4+MPfrEJ6y6gbWjUV+x72p8+30qfecNz4rYA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SSRNR1mQhztZY for ; Sat, 11 Nov 2023 19:59:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3ABJxJlF064055 for ; Sat, 11 Nov 2023 19:59:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3ABJxJFY064054 for bugs@FreeBSD.org; Sat, 11 Nov 2023 19:59:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275031] rc.d/ldconfig missing hard-coded /lib/casper from rtld-elf STANDARD_LIBRARY_PATH Date: Sat, 11 Nov 2023 19:59:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: john@saltant.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275031 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=3D246246&action= =3Dedit stable/12: Prepend /lib/casper to rc.d/ldconfig's baseline Synopsis =3D=3D=3D=3D=3D=3D=3D=3D 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 =3D=3D=3D=3D=3D=3D=3D % ldd /usr/local/sbin/tcpdump | grep libcap_dns libcap_dns.so.2 =3D> /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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % sudo pkg check -B tcpdump Checking tcpdump: 100% % Observed behavior =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D % 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 =3D=3D=3D=3D=3D=3D=3D=3D 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=20 "/lib/casper:/lib:/usr/lib" in libexec/rtld-elf/paths.h on the stable/12 br= anch and in libexec/rtld-elf/rtld_paths.h on the stable/13 branch. Considering r= tld 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 =3D=3D=3D=3D=3D=3D=3D=3D https://lists.freebsd.org/archives/freebsd-ports/2023-November/004889.html Testing =3D=3D=3D=3D=3D=3D=3D % 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=20 /usr/local/lib/compat/pkg /lib/casper /usr/local/lib/compat/pkg=20 /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% --=20 You are receiving this mail because: You are the assignee for the bug.=