Security risk in setting up $LD_LIBRARY_PATH by KDE script
vladc6 at yahoo.com
Mon Feb 18 18:17:49 GMT 2008
The KDE script
that developers are encouraged to place in their ~/.bashrc file
contains the following line:
If $LD_LIBRARY_PATH is empty before the above line is executed, then
the $LD_LIBRARY_PATH after that line will end in a colon (:).
$ echo $LD_LIBRARY_PATH
This causes files such as tls, i686, sse2, cmov and libc.so.6 to be
searched for in the current directory (.). Wouldn't this be a security
Removing the final colon from $LD_LIBRARY_PATH prevents searching the
current directory. Shouldn't we therefore first check whether
$LD_LIBRARY_PATH is empty?
if [[ $LD_LIBRARY_PATH = "" ]]
then export LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib
Never miss a thing. Make Yahoo your home page.
More information about the kde-core-devel