Linux sandbox: fix security issue.
Linux sandbox: fix security issue.

(Reported by Julien Tinnes)

Because the chroot helper process and the zygote share a FILES
structure, the latter can race the former and change the value of cwd
before it does chroot("."). Because of this, the zygote could chroot
into a directory of its choosing. Once there, it could setup hardlinks
to SUID binaries and possibly make them misbehave if they weren't
sufficiently paranoid.

This possibility should have been migigated by the removal of
dangerous environment variables. However, we had to reinstate them in
order to pass LD_LIBRARY_PATH because some setups don't have ld.so
setup to use /usr/lib32 and also for ffmpeg.

http://codereview.chromium.org/164427


git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@23228 0039d316-1c4b-4281-b951-d872f2087c98

Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium