Closed Bug 1017945 Opened 10 years ago Closed 10 years ago

Make the XPConnect shell Vista aware to avoid registry virtualization

Categories

(Core :: XPConnect, defect)

16 Branch
x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: bbondy, Assigned: bbondy)

Details

Attachments

(1 file, 1 obsolete file)

The xpcshell binary does not have a manifest.
And so Windows considers it to be NOT Vista aware. 

This means that when writes to HKLM happen from a running xpcshell process that is not elevated, those writes get virtualized into a sandboxed location, and they succeed.

This is kind of dangerous because our firefox.exe, and updater.exe are Vista aware.  
And so when they try to write to HKLM, they fail.
We have some locations in code where we try to write to HKLM, and when that fails we fall back to HKCU.  xpcshell.exe, updater.exe and firefox.exe should be following the same rules in regards to Windows virtualization.

In my case I ran into a problem with running updater tests where xpcshell writes a registry value which firefox.exe later reads.  But since the xpcshell test tries to write to HKLM, and then falls back to HKCU, it succeeds on the HKLM into a virtualized location.  firefox.exe later tries to read that registry entry and doesn't find it because it is at a virtualized location.

We could fix this by specifying REG_KEY_DONT_VIRTUALIZE on reg key accesses, but it's safest just to add a manifest to the binary.
http://msdn.microsoft.com/en-ca/library/windows/desktop/aa965884(v=vs.85).aspx
Will run through try after review to make sure there are no side effects in any other tests.
Attachment #8431263 - Flags: review?(jmathies)
Comment on attachment 8431263 [details] [diff] [review]
bug1017945_xpcshell_virtualization.diff

Change "Firefox Launcher" to XPCShell or similar.
Why not just add the other OS's supportedOS?
Attached patch Patch rev2.Splinter Review
No reason for the limited SupportedOS, I just happened to have copied it from the CommandExecuteHandler's manifest. I added the missing ones.  Updated description to XPConnect Shell
Attachment #8431263 - Attachment is obsolete: true
Attachment #8431263 - Flags: review?(jmathies)
Attachment #8431272 - Flags: review?(robert.strong.bugs)
Attachment #8431272 - Flags: review?(robert.strong.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/15838e0f0578
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: