Closed Bug 1001842 Opened 11 years ago Closed 11 years ago

On POSIX systems, expose the umask to privileged Javascript

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: zwol, Assigned: zwol)

References

Details

(Keywords: dev-doc-needed)

Attachments

(2 files, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #961080 +++ I am breaking out the first two patches from bug 961080, which are uncontroversial, and landing them here. This is strictly for ease of tracking: the reviews have already happened in that bug. To solve bug 961080 in a completely safe manner, we need to determine the umask at early startup time and expose it to privileged Javascript. (The underlying system call to find out this value is not thread-safe: http://pubs.opengroup.org/onlinepubs/9699919799/functions/umask.html )
Attached patch record umask on startup (deleted) — Splinter Review
Patch 1/2. r=bsmedberg in bug 961080 comment 9
Attachment #8413199 - Flags: review+
Attached patch reflect the umask into OS.Constants (obsolete) (deleted) — Splinter Review
Patch 2/2. r=khuey without comment immediately after bug 961080 comment 24.
Attachment #8413200 - Flags: review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/284be1609a50 https://hg.mozilla.org/integration/mozilla-inbound/rev/2629257557ff Hopefully we will get the rest of bug 961080 nailed down in time to uplift to 31/ESR, but at least this will enable extensions to patch it.
Keywords: dev-doc-needed
Blocks: 1001849
Attached patch reflect the umask into OS.Constants, v2b (obsolete) (deleted) — Splinter Review
So it turns out that "@mozilla.org/system-info;1" cannot be used off the main thread. Conveniently, the code behind OS.Constants already has logic to handle that sort of thing. Pushed to try this time: https://tbpl.mozilla.org/?tree=Try&rev=3facd5dc1839 Will re-land tomorrow if that's green.
Attachment #8413200 - Attachment is obsolete: true
Attachment #8413310 - Flags: review+
Attachment #8413310 - Flags: superreview?(bzbarsky)
Comment on attachment 8413310 [details] [diff] [review] reflect the umask into OS.Constants, v2b You want UINT_TO_JSVAL, I'd think. sr=me with that.
Attachment #8413310 - Flags: superreview?(bzbarsky) → superreview+
s/INT_TO_JSVAL/UINT_TO_JSVAL/ as suggested by bz. No other changes.
Attachment #8413310 - Attachment is obsolete: true
Attachment #8413364 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 1028366
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: