Closed Bug 1434911 Opened 8 years ago Closed 8 years ago

NS_OpenAnonymousTemporaryNsIFile should create files as 0600 instead of 0700

Categories

(Core :: XPCOM, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: Alex_Gaynor, Assigned: Alex_Gaynor)

Details

Attachments

(1 file)

Currently files created by NS_OpenAnonymousTemporaryNsIFile have 0700 permissions. None of the consumers I see have any need for the executable bit, so we should drop it and use 0600 instead. There's no particular attack this is preventing, just a general principle of least permission - no reason to create things with more permissions than we need.
+1
Priority: -- → P1
Comment on attachment 8947461 [details] Bug 1434911 - when creating temporary files, don't set the executable bit; https://reviewboard.mozilla.org/r/217158/#review222962 Do we know whether our download code uses temporary files and if it sets the executable bit correctly when it renames downloaded files? (i.e. This change is not going to break some subtle logic in the download code?) I assume that it does, but I guess I've never checked...
Attachment #8947461 - Flags: review?(nfroyd) → review+
Comment on attachment 8947461 [details] Bug 1434911 - when creating temporary files, don't set the executable bit; https://reviewboard.mozilla.org/r/217158/#review222962 A review of all the callers in searchfox doesn't show any that look like they're related to downloading. I also kicked off a try run and won't land until that's green.
Comment on attachment 8947461 [details] Bug 1434911 - when creating temporary files, don't set the executable bit; https://reviewboard.mozilla.org/r/217158/#review222962 Excellent, thank you!
Keywords: checkin-needed
Pushed by ccoroiu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3308206a8cbb when creating temporary files, don't set the executable bit; r=froydnj
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: