diff --git a/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt b/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt index aed840de534d..a59b05d8e06a 100644 --- a/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt +++ b/security/sandbox/modifications-to-chromium-to-reapply-after-upstream-merge.txt @@ -1,4 +1,5 @@ Please add a link to the bugzilla bug and patch name that should be re-applied. Also, please update any existing links to their actual mozilla-central changeset. -https://bugzilla.mozilla.org/show_bug.cgi?id=1018966 wosChromiumChanges.patch +https://hg.mozilla.org/mozilla-central/rev/e7eef85c1b0a +https://bugzilla.mozilla.org/show_bug.cgi?id=1080567 bug1080567.patch diff --git a/security/sandbox/win/src/registry_interception.cc b/security/sandbox/win/src/registry_interception.cc index b1e26b657a31..d62191d093de 100644 --- a/security/sandbox/win/src/registry_interception.cc +++ b/security/sandbox/win/src/registry_interception.cc @@ -10,7 +10,7 @@ #include "sandbox/win/src/sandbox_nt_util.h" #include "sandbox/win/src/sharedmem_ipc_client.h" #include "sandbox/win/src/target_services.h" -#ifdef MOZ_CONTENT_SANDBOX // For upstream merging, use patch in bug 1018966 to reapply warn only sandbox code +#ifdef MOZ_CONTENT_SANDBOX #include "mozilla/warnonlysandbox/warnOnlySandbox.h" #endif @@ -29,9 +29,11 @@ NTSTATUS WINAPI TargetNtCreateKey(NtCreateKeyFunction orig_CreateKey, return status; #ifdef MOZ_CONTENT_SANDBOX - mozilla::warnonlysandbox::LogBlocked("NtCreateKey", - object_attributes->ObjectName->Buffer, - object_attributes->ObjectName->Length); + if (STATUS_OBJECT_NAME_NOT_FOUND != status) { + mozilla::warnonlysandbox::LogBlocked("NtCreateKey", + object_attributes->ObjectName->Buffer, + object_attributes->ObjectName->Length); + } #endif // We don't trust that the IPC can work this early. @@ -173,9 +175,11 @@ NTSTATUS WINAPI TargetNtOpenKey(NtOpenKeyFunction orig_OpenKey, PHANDLE key, return status; #ifdef MOZ_CONTENT_SANDBOX - mozilla::warnonlysandbox::LogBlocked("NtOpenKey", - object_attributes->ObjectName->Buffer, - object_attributes->ObjectName->Length); + if (STATUS_OBJECT_NAME_NOT_FOUND != status) { + mozilla::warnonlysandbox::LogBlocked("NtOpenKey", + object_attributes->ObjectName->Buffer, + object_attributes->ObjectName->Length); + } #endif return CommonNtOpenKey(status, key, desired_access, object_attributes); @@ -196,9 +200,11 @@ NTSTATUS WINAPI TargetNtOpenKeyEx(NtOpenKeyExFunction orig_OpenKeyEx, return status; #ifdef MOZ_CONTENT_SANDBOX - mozilla::warnonlysandbox::LogBlocked("NtOpenKeyEx", - object_attributes->ObjectName->Buffer, - object_attributes->ObjectName->Length); + if (STATUS_OBJECT_NAME_NOT_FOUND != status) { + mozilla::warnonlysandbox::LogBlocked("NtOpenKeyEx", + object_attributes->ObjectName->Buffer, + object_attributes->ObjectName->Length); + } #endif return CommonNtOpenKey(status, key, desired_access, object_attributes);