Bug 1230910 Change ERROR_INVALID_TOKEN to GetLastError() draft
authorTom Ritter <tom@mozilla.com>
Wed, 08 Mar 2017 22:40:57 +0000
changeset 496078 d55b025d1cbacd503674842ac2de52fe52c738f1
parent 496077 acff88cfc746297784c823a060cefcea94b3a10e
child 496079 5732bd44616c876672dc98e2b367d0bf24dc1565
push id48518
push userbmo:tom@mozilla.com
push dateThu, 09 Mar 2017 19:30:51 +0000
bugs1230910
milestone52.0.1
Bug 1230910 Change ERROR_INVALID_TOKEN to GetLastError() MozReview-Commit-ID: JzmoOIowIEB
security/sandbox/chromium/sandbox/win/src/target_process.cc
--- a/security/sandbox/chromium/sandbox/win/src/target_process.cc
+++ b/security/sandbox/chromium/sandbox/win/src/target_process.cc
@@ -216,17 +216,17 @@ DWORD TargetProcess::Create(const wchar_
     NtSetInformationProcess SetInformationProcess = NULL;
     ResolveNTFunctionPtr("NtSetInformationProcess", &SetInformationProcess);
 
     NTSTATUS status = SetInformationProcess(
         process_info.process_handle(),
         static_cast<PROCESS_INFORMATION_CLASS>(NtProcessInformationAccessToken),
         &process_access_token, sizeof(process_access_token));
     if (!NT_SUCCESS(status)) {
-      win_result = ERROR_INVALID_TOKEN;
+      win_result = ::GetLastError();//ERROR_INVALID_TOKEN;
       ::TerminateProcess(process_info.process_handle(), 0);  // exit code
       return win_result;
     }
   }
 
   base_address_ = GetBaseAddress(exe_path, entry_point);
   sandbox_process_info_.Set(process_info.Take());
   return win_result;