Closed Bug 1363844 Opened 8 years ago Closed 8 years ago

Add flag to DLL blocklist to make a block specific to child processes

Categories

(Core :: General, enhancement)

Unspecified
Windows
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file)

I wrote this code as part of a test for bug 1361230. I think this would be useful in general in case there are DLLs that are legit injections in the parent but not wanted in child processes.
Since the blocklist doesn't have the luxury of being able to call XRE_IsParentProcess() during its initialization, I have added a parameter to DllBlocklist_Initialize to set whether the blocklist should consider itself to be in a parent process or not, and have updated the various callsites accordingly.
Attachment #8866481 - Flags: review?(dmajor)
Comment on attachment 8866481 [details] [diff] [review] Add CHILD_PROCESSES_ONLY flag to DLL blocklist Review of attachment 8866481 [details] [diff] [review]: ----------------------------------------------------------------- Would be nice to use some enum like GeckoProcessType instead of the boolean, but I assume you can't use GeckoProcessType from here. What do you think about defining another one-off enum { PARENT, CHILD } here? Maybe that would be too much duplication. Failing that, at least an inline comment foo(/* myParam = */ true) would help to clarify. ::: mozglue/build/WindowsDllBlocklist.cpp @@ +72,5 @@ > enum { > FLAGS_DEFAULT = 0, > BLOCK_WIN8PLUS_ONLY = 1, > USE_TIMESTAMP = 4, > + CHILD_PROCESSES_ONLY = 8 Feel free to fill in the gap with `2` here.
Attachment #8866481 - Flags: review?(dmajor) → review+
(In reply to David Major [:dmajor] from comment #2) > Comment on attachment 8866481 [details] [diff] [review] > Would be nice to use some enum like GeckoProcessType instead of the boolean, > but I assume you can't use GeckoProcessType from here. What do you think > about defining another one-off enum { PARENT, CHILD } here? Yeah, I was kinda unhappy with that too. Will replace with an enum.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
See Also: → 1365047
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: