diff options
Diffstat (limited to 'remoting/host/win/unprivileged_process_delegate.cc')
-rw-r--r-- | remoting/host/win/unprivileged_process_delegate.cc | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/remoting/host/win/unprivileged_process_delegate.cc b/remoting/host/win/unprivileged_process_delegate.cc index 1457bd7038..1f5a174603 100644 --- a/remoting/host/win/unprivileged_process_delegate.cc +++ b/remoting/host/win/unprivileged_process_delegate.cc @@ -113,7 +113,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid, // Convert the logon SID into a string. std::string logon_sid_string = ConvertSidToString(logon_sid.get()); if (logon_sid_string.empty()) { - LOG_GETLASTERROR(ERROR) << "Failed to convert a SID to string"; + PLOG(ERROR) << "Failed to convert a SID to string"; return false; } @@ -134,7 +134,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid, ScopedSd desktop_sd = ConvertSddlToSd(desktop_sddl); ScopedSd window_station_sd = ConvertSddlToSd(window_station_sddl); if (!desktop_sd || !window_station_sd) { - LOG_GETLASTERROR(ERROR) << "Failed to create a security descriptor."; + PLOG(ERROR) << "Failed to create a security descriptor."; return false; } @@ -169,13 +169,13 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid, base::UTF8ToUTF16(window_station_name).c_str(), window_station_flags, desired_access, &security_attributes)); if (!handles.window_station()) { - LOG_GETLASTERROR(ERROR) << "CreateWindowStation() failed"; + PLOG(ERROR) << "CreateWindowStation() failed"; return false; } // Switch to the new window station and create a desktop on it. if (!SetProcessWindowStation(handles.window_station())) { - LOG_GETLASTERROR(ERROR) << "SetProcessWindowStation() failed"; + PLOG(ERROR) << "SetProcessWindowStation() failed"; return false; } @@ -196,12 +196,12 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid, // Switch back to the original window station. if (!SetProcessWindowStation(current_window_station)) { - LOG_GETLASTERROR(ERROR) << "SetProcessWindowStation() failed"; + PLOG(ERROR) << "SetProcessWindowStation() failed"; return false; } if (!handles.desktop()) { - LOG_GETLASTERROR(ERROR) << "CreateDesktop() failed"; + PLOG(ERROR) << "CreateDesktop() failed"; return false; } @@ -237,8 +237,7 @@ void UnprivilegedProcessDelegate::LaunchProcess( // Create a restricted token that will be used to run the worker process. ScopedHandle token; if (!CreateRestrictedToken(&token)) { - LOG_GETLASTERROR(ERROR) - << "Failed to create a restricted LocalService token"; + PLOG(ERROR) << "Failed to create a restricted LocalService token"; ReportFatalError(); return; } @@ -247,7 +246,7 @@ void UnprivilegedProcessDelegate::LaunchProcess( // and desktop. ScopedSid logon_sid = GetLogonSid(token); if (!logon_sid) { - LOG_GETLASTERROR(ERROR) << "Failed to retrieve the logon SID"; + PLOG(ERROR) << "Failed to retrieve the logon SID"; ReportFatalError(); return; } @@ -256,7 +255,7 @@ void UnprivilegedProcessDelegate::LaunchProcess( ScopedSd process_sd = ConvertSddlToSd(kWorkerProcessSd); ScopedSd thread_sd = ConvertSddlToSd(kWorkerThreadSd); if (!process_sd || !thread_sd) { - LOG_GETLASTERROR(ERROR) << "Failed to create a security descriptor"; + PLOG(ERROR) << "Failed to create a security descriptor"; ReportFatalError(); return; } @@ -292,14 +291,13 @@ void UnprivilegedProcessDelegate::LaunchProcess( "%d", reinterpret_cast<ULONG_PTR>(client.Get())); // Pass the IPC channel via the command line. - CommandLine command_line(target_command_->argv()); + base::CommandLine command_line(target_command_->argv()); command_line.AppendSwitchASCII(kDaemonPipeSwitchName, pipe_handle); // Create our own window station and desktop accessible by |logon_sid|. WindowStationAndDesktop handles; if (!CreateWindowStationAndDesktop(logon_sid.Pass(), &handles)) { - LOG_GETLASTERROR(ERROR) - << "Failed to create a window station and desktop"; + PLOG(ERROR) << "Failed to create a window station and desktop"; ReportFatalError(); return; } @@ -411,7 +409,7 @@ void UnprivilegedProcessDelegate::ReportProcessLaunched( desired_access, FALSE, 0)) { - LOG_GETLASTERROR(ERROR) << "Failed to duplicate a handle"; + PLOG(ERROR) << "Failed to duplicate a handle"; ReportFatalError(); return; } @@ -420,4 +418,4 @@ void UnprivilegedProcessDelegate::ReportProcessLaunched( event_handler_->OnProcessLaunched(limited_handle.Pass()); } -} // namespace remoting +} // namespace remoting |