Re: firefox-37, where to put
Hi.
On Thu, 2 Apr 2015 15:06:42 -0400
Gene Heskett <gheskett@wdtv.com> wrote:
> "ldd" says its not an executable, but then says ldd itself is not,
> while "file" says its (ldd) a Bourne Again SHell script.
>
> Am I compromized?
Let's see what all fuss is about.
First,
wget -q
http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/37.0/linux-x86_64/en-US/firefox-37.0.tar.bz2
Second,
wget -q
ftp.mozilla.org/pub/mozilla.org/firefox/releases/37.0/SHA512SUMS
Third,
sha512sum firefox-37.0.tar.bz2
Fourth,
grep
665f856cd9f69db2122c6d5bf25305e0ffa60bb56f342be9512cbe81e912c0966a7e100ce2d0e30bf978cf94fcf43a2de4c8afa6834ebd46ff7b292f6eec3224
SHA512SUMS
And hurray, I've apparently got Genuine™ Mozilla Firefox 37.
Next,
tar xf firefox-37.0.tar.bz2 && cd firefox
And, finally
$ file firefox
firefox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID
[sha1]=0xd9c52e07232a78690be6d991546a12bb3668601d, stripped
$ file --mime-type firefox
firefox: application/x-executable
So, it's definitely a binary. Yet,
$ ldd ./firefox
not a dynamic executable
Why? That's why:
$ pwd
/tmp/firefox
$ mount | grep /tmp
tmpfs on /tmp type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=12234980k)
Notice *noexec* here.
You see, ldd actually tries to execute a file (by using special hack in
ld.so, so that's OK). And of course, if you put an executable at
no-executable mountpoint, not only you won't be able to run it, ldd
also ceases to work.
And yes, ldd is a shell script. A customary way to prepend hacky
environment variables to executables is using shell wrappers. ldd is
just one of those.
Still, if ldd fails you - use objdump:
$ objdump -x firefox | grep NEED
NEEDED libpthread.so.0
NEEDED libdl.so.2
NEEDED librt.so.1
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libc.so.6
NEEDED ld-linux-x86-64.so.2
VERNEED 0x00000000004036c8
VERNEEDNUM 0x0000000000000007
tl;dr version - move your firefox directory to filesystem mounted with
exec. Problem should solve itself.
Reco
Reply to: