Bug 1161110 - /usr/bin/firefox should not mess with TMPDIR
Summary: /usr/bin/firefox should not mess with TMPDIR
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 969658 (view as bug list)
Depends On: 867073 956380
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 12:01 UTC by Michael Schwendt
Modified: 2015-06-17 09:35 UTC (History)
6 users (show)

Fixed In Version: firefox-33.0-5
Clone Of:
Environment:
Last Closed: 2014-11-10 08:28:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Schwendt 2014-11-06 12:01:02 UTC
This is about Fedora's Firefox changing the runtime environment for programs it can launch compared with the user's desktop environment. /usr/bin/firefox does:

  TMPDIR="${TMPDIR:-/var/tmp}"
  export TMPDIR

If it prefers /var/tmp over /tmp, it should do that internally only and not export a $TMPDIR that differs from the rest of the system.

Most (all?) API calls that return a temporary directory location default to /tmp if $TMPDIR is not set. Some still look at other environment variables, too, but that is beyond the scope of this ticket. Programs launched by Firefox would be affected by a $TMPDIR that is different than when starting the program normally.

At  https://fedorahosted.org/fesco/ticket/1365  a patch for Firefox has been demonstrated that would set /var/tmp internally.

Firefox should not override system defaults. It may default to /var/tmp (even with no option to override that), but $TMPDIR is not for /var/tmp but /tmp by default ( http://fedoraproject.org/wiki/Features/tmp-on-tmpfs ).

Comment 1 Martin Stransky 2014-11-06 15:37:52 UTC
Okay, will look at it.

Comment 2 Martin Stransky 2014-11-07 13:07:50 UTC
I'd rather see a patch which moves all temporary data to /tmp (the recent tmpfs) but only downloads are saved to /var/tmp.

Comment 3 Martin Stransky 2014-11-07 13:08:52 UTC
So we should remove the TMPDIR from the launch script but patch Firefox to save partial downloads to /var/tmp.

Comment 4 Martin Stransky 2014-11-10 08:28:17 UTC
Okay, let's remove the hack we use. The partial file is downloaded to /tmp while we wait for user interaction so the 1GB limit should be enough. Debian uses the same model. Added to firefox-33.0-5.

Comment 5 Ondrej Holy 2015-06-17 09:35:11 UTC
*** Bug 969658 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.