Date: Fri, 24 Jan 2003 12:13:31 +0200 (EET) From: kota@alkar.net To: FreeBSD-gnats-submit@FreeBSD.org Cc: kota@alkar.net Subject: conf/47430: wrong order of arguments of ldconfig in /etc/rc.d/ldconfig script in insecure mode Message-ID: <200301241013.h0OADVDT000791@fish.alkar.net>
index | next in thread | raw e-mail
>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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301241013.h0OADVDT000791>
