Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256688 - www-client/mozilla-firefox-3.0.5 ignores LD_LIBRARY_PATH
Summary: www-client/mozilla-firefox-3.0.5 ignores LD_LIBRARY_PATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 20:36 UTC by Jürgen Löb
Modified: 2009-07-02 16:38 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Löb 2009-01-28 20:36:33 UTC
mozilla-firefox-3.0.5.ebuild creates a startup script for firefox that overwrites LD_LIBRARY_PATH. Since then for example java3d cannot work it schould only prepend to LD_LIBRARY_PATH. Line 282 in the ebuild schould be changed from:

export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"

to

export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}:$LD_LIBRARY_PATH"

for giving firefox libraries priority over other libraries but not ignoring other libraries completely.

Reproducible: Always

Steps to Reproduce:
1.install java plugin i.e. from icedtea
2.install sun-java3d-bin
3.include /usr/lib/sun-java3d-bin/ in LD_LIBRARY_PATH
4. visit http://www.chemgapedia.de/vsengine/info/de/help/requirements/java.html
and watch the console output from firefox:

...
  PIPE: appletviewer wrote: status Fehler: java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path
java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path
...
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-30 01:11:34 UTC
Index: mozilla-firefox-3.0.5.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.0.5.ebuild,v
retrieving revision 1.12
diff -u -B -r1.12 mozilla-firefox-3.0.5.ebuild
--- mozilla-firefox-3.0.5.ebuild        25 Jan 2009 20:22:19 -0000      1.12
+++ mozilla-firefox-3.0.5.ebuild        30 Jan 2009 01:11:16 -0000
@@ -279,7 +279,7 @@
                # Create /usr/bin/firefox
                cat <<EOF >"${D}"/usr/bin/firefox
 #!/bin/sh
-export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}"
+export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}:${LD_LIBRARY_PATH}"
 exec "${MOZILLA_FIVE_HOME}"/firefox "\$@"
 EOF
                fperms 0755 /usr/bin/firefox
Comment 2 Jürgen Löb 2009-02-15 22:58:08 UTC
Jeroens diff should fix the problem. The Problem still exists in 3.0.6.
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2009-03-05 21:52:08 UTC
And in 3.0.7 too.
Comment 4 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-07-02 06:57:38 UTC
The fix is in 3.5-r1, 3.0* will not be touched since they're stable versions.

Thanks for reporting :)
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2009-07-02 10:39:35 UTC
When LD_LIBRARY_PATH is unset (as it usually is), LD_LIBRARY_PATH will be set to "$MOZILLA_FIVE_HOME":"", where the second entry pulls in the current directory. This is a security hole. Please fix this by doing:

export LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}${LD_LIBRARY_PATH+":${LD_LIBRARY_PATH}"}"

or similar.
Comment 6 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-07-02 16:06:32 UTC
(In reply to comment #5)
> When LD_LIBRARY_PATH is unset (as it usually is), LD_LIBRARY_PATH will be set
> to "$MOZILLA_FIVE_HOME":"", where the second entry pulls in the current
> directory. This is a security hole. Please fix this by doing:
> 
> export
> LD_LIBRARY_PATH="${MOZILLA_FIVE_HOME}${LD_LIBRARY_PATH+":${LD_LIBRARY_PATH}"}"
> 
> or similar.
> 

Gah, I truly am an idiot. Not to mention, the "fix" was build-time, not run-time. Fixed for real now, thanks :)