From owner-freebsd-bugs@FreeBSD.ORG Wed Nov 2 03:20:19 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 762B116A41F for ; Wed, 2 Nov 2005 03:20:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE4FC43D46 for ; Wed, 2 Nov 2005 03:20:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jA23KIXP014722 for ; Wed, 2 Nov 2005 03:20:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jA23KIna014721; Wed, 2 Nov 2005 03:20:18 GMT (envelope-from gnats) Resent-Date: Wed, 2 Nov 2005 03:20:18 GMT Resent-Message-Id: <200511020320.jA23KIna014721@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Frank Laszlo Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98E7116A41F for ; Wed, 2 Nov 2005 03:14:28 +0000 (GMT) (envelope-from laszlof@ritamari.vonostingroup.com) Received: from ritamari.vonostingroup.com (ritamari.vonostingroup.com [216.144.193.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4134143D45 for ; Wed, 2 Nov 2005 03:14:28 +0000 (GMT) (envelope-from laszlof@ritamari.vonostingroup.com) Received: from laszlof by ritamari.vonostingroup.com with local (Exim 4.54 (FreeBSD)) id 1EX951-0004bi-GV; Tue, 01 Nov 2005 22:14:27 -0500 Message-Id: Date: Tue, 01 Nov 2005 22:14:27 -0500 From: Frank Laszlo To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mark@uplink.dk Subject: conf/88383: [PATCH]: etc/rc.d/ldconfig:does not properly handle ld{-elf}.so.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Laszlo List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 03:20:19 -0000 >Number: 88383 >Category: conf >Synopsis: [PATCH]: etc/rc.d/ldconfig:does not properly handle ld{-elf}.so.conf >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 02 03:20:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Frank Laszlo >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD ritamari.vonostingroup.com 5.4-STABLE FreeBSD 5.4-STABLE #0: Thu Jun 9 22:20:56 EDT 2005 laszlof@ritamari.vonostingroup.com:/usr/obj/usr/src/sys/RITAMARI i386 >Description: etc/rc.d/ldconfig currently is supposed to add files from rc.conf defined by ldconfig_paths as well as paths *within* /etc/ld.so.conf and /etc/ld-elf.so.conf respectively. This is not the case, as the code processes /etc/ld{-elf}.so.conf as a path to be passed to ldconfig. The attached patch will fix this segment of code. >How-To-Repeat: Add a library path to /etc/ld.so.conf or /etc/ld-elf.so.conf and rerun /etc/rc.d/ldconfig. >Fix: --- rc.d-ldconfig.diff begins here --- --- etc/rc.d/ldconfig.orig Tue Nov 1 21:57:47 2005 +++ etc/rc.d/ldconfig Tue Nov 1 22:04:39 2005 @@ -22,11 +22,18 @@ checkyesno ldconfig_insecure && _ins="-i" if [ -x "${ldconfig_command}" ]; then _LDC="/lib /usr/lib" - for i in ${ldconfig_paths} /etc/ld-elf.so.conf; do + for i in ${ldconfig_paths}; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" fi done + if [ -r /etc/ld-elf.so.conf ]; then + for i in `cat /etc/ld-elf.so.conf`; do + if [ -r "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done + fi echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} @@ -36,11 +43,18 @@ # Default the a.out ldconfig path. : ${ldconfig_paths_aout=${ldconfig_paths}} _LDC=/usr/lib/aout - for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do + for i in ${ldconfig_paths_aout}; do if [ -r "${i}" ]; then _LDC="${_LDC} ${i}" fi done + if [ -r /etc/ld.so.conf ]; then + for i in `cat /etc/ld.so.conf`; do + if [ -r "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done + fi echo 'a.out ldconfig path:' ${_LDC} ${ldconfig} -aout ${_ins} ${_LDC} ;; --- rc.d-ldconfig.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: