Add an rc.conf knob "ldconfig_insecure" to disable ldconfig's

security checks.  Set the default to NO, i.e., secure.

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
This commit is contained in:
John Polstra 2000-08-11 03:26:30 +00:00
parent 71c38472de
commit e9edb38551
2 changed files with 9 additions and 2 deletions

View File

@ -285,6 +285,7 @@ linux_enable="NO" # Linux binary compatibility loaded at startup (or NO).
svr4_enable="NO" # SysVR4 emulation loaded at startup (or NO).
osf1_enable="NO" # Alpha OSF/1 emulation loaded at startup (or NO).
clear_tmp_enable="NO" # Clear /tmp at startup.
ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks
ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib"
# shared library search paths
ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout"

10
etc/rc
View File

@ -379,6 +379,12 @@ esac
# Make shared lib searching a little faster. Leave /usr/lib first if you
# add your own entries or you may come to grief.
#
ldconfig="/sbin/ldconfig"
case ${ldconfig_insecure} in
[Yy][Ee][Ss])
ldconfig="${ldconfig} -i"
;;
esac
if [ -x /sbin/ldconfig ]; then
case `/usr/bin/objformat` in
elf)
@ -389,7 +395,7 @@ if [ -x /sbin/ldconfig ]; then
fi
done
echo 'setting ELF ldconfig path:' ${_LDC}
ldconfig -elf ${_LDC}
${ldconfig} -elf ${_LDC}
;;
esac
@ -405,7 +411,7 @@ if [ -x /sbin/ldconfig ]; then
fi
done
echo 'setting a.out ldconfig path:' ${_LDC}
ldconfig -aout ${_LDC}
${ldconfig} -aout ${_LDC}
;;
esac
fi