From owner-freebsd-bugs Fri Jan 24 2:10:13 2003 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 D2EFA37B401 for ; Fri, 24 Jan 2003 02:10:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C35643ED8 for ; Fri, 24 Jan 2003 02:10:10 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0OAA5NS004510 for ; Fri, 24 Jan 2003 02:10:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0OAA4uH004509; Fri, 24 Jan 2003 02:10:04 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A50D237B401 for ; Fri, 24 Jan 2003 02:05:20 -0800 (PST) Received: from fish.alkar.net (fish.alkar.net [212.86.226.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ACF543E4A for ; Fri, 24 Jan 2003 02:05:17 -0800 (PST) (envelope-from root@fish.alkar.net) Received: from fish.alkar.net (localhost [127.0.0.1]) by fish.alkar.net (8.12.6/8.12.6) with ESMTP id h0OADYIx000792; Fri, 24 Jan 2003 12:13:34 +0200 (EET) (envelope-from root@fish.alkar.net) Received: (from root@localhost) by fish.alkar.net (8.12.6/8.12.6/Submit) id h0OADVDT000791; Fri, 24 Jan 2003 12:13:31 +0200 (EET) Message-Id: <200301241013.h0OADVDT000791@fish.alkar.net> Date: Fri, 24 Jan 2003 12:13:31 +0200 (EET) From: kota@alkar.net Reply-To: kota@at.com.ua To: FreeBSD-gnats-submit@FreeBSD.org Cc: kota@alkar.net X-Send-Pr-Version: 3.113 Subject: conf/47430: wrong order of arguments of ldconfig in /etc/rc.d/ldconfig script in insecure mode Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 47430 >Category: conf >Synopsis: wrong order of arguments of ldconfig in /etc/rc.d/ldconfig script in insecure mode >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: Fri Jan 24 02:10:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Charlie & >Release: FreeBSD 5.0-RELEASE i386 >Organization: >Environment: System: FreeBSD fish.alkar.net 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: in 5.0 ldconfig allow this order of arguments ldconfig -elf -i... and doesn't allow ldconfig -i -elf .... That's why if you set ldconfig_insecure='YES' /etc/rc.d/ldconfig call ldconfig with the wrong order of arguments and the result is empty list of shared libraryes directories. Is this problem of scrypt or problem of ldconfig binary? >How-To-Repeat: set ldconfig_insecure="YES" in rc.conf.local >Fix: If this is problem of script and not ldconfig binary, this is small patch. --- ldconfig.patch begins here --- --- ldconfig.orig Fri Jan 24 11:03:56 2003 +++ ldconfig Fri Jan 24 11:27:15 2003 @@ -20,8 +20,8 @@ { case ${OSTYPE} in FreeBSD) - ldconfig=${ldconfig_command} - checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" +# ldconfig=${ldconfig_command} +# checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" if [ -x "${ldconfig_command}" ]; then _LDC=/usr/lib for i in ${ldconfig_paths}; do @@ -30,7 +30,9 @@ fi done echo 'ELF ldconfig path:' ${_LDC} - ${ldconfig} -elf ${_LDC} + ldconfig="${ldconfig_command} -elf " + checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" + ${ldconfig} ${_LDC} # Legacy aout support for i386 only case `sysctl -n hw.machine_arch` in @@ -44,7 +46,9 @@ fi done echo 'a.out ldconfig path:' ${_LDC} - ${ldconfig} -aout ${_LDC} + ldconfig="${ldconfig_command} -aout " + checkyesno ldconfig_insecure && ldconfig="${ldconfig} -i" + ${ldconfig} ${_LDC} ;; esac fi --- ldconfig.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message