| Index: remoting/host/win/launch_process_with_token.h
|
| diff --git a/remoting/host/win/launch_process_with_token.h b/remoting/host/win/launch_process_with_token.h
|
| index cca7ec96fc625e6eacbe6d090a7486493d8ef0c1..090c4bfe9aff624bd617ef413d6e20381d51e538 100644
|
| --- a/remoting/host/win/launch_process_with_token.h
|
| +++ b/remoting/host/win/launch_process_with_token.h
|
| @@ -14,11 +14,15 @@
|
| #include "base/command_line.h"
|
| #include "base/files/file_path.h"
|
| #include "base/lazy_instance.h"
|
| -#include "base/process/launch.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/win/scoped_handle.h"
|
|
|
| namespace remoting {
|
| +
|
| +// This lock should be taken when creating handles that will be inherited by
|
| +// a child process. Without it the child process can inherit handles created for
|
| +// a different child process started at the same time.
|
| +extern base::LazyInstance<base::Lock>::Leaky g_inherit_handles_lock;
|
|
|
| // Creates a copy of the current process token for the given |session_id| so
|
| // it can be used to launch a process in that session.
|
| @@ -27,20 +31,19 @@
|
|
|
| // Launches |binary| in the security context of the user represented by
|
| // |user_token|. The session ID specified by the token is respected as well.
|
| -// If |handles_to_inherit| is non-empty, these handles will be inherited by the
|
| -// new process. The other parameters are passed directly to
|
| -// CreateProcessAsUser().
|
| -bool LaunchProcessWithToken(
|
| - const base::FilePath& binary,
|
| - const base::CommandLine::StringType& command_line,
|
| - HANDLE user_token,
|
| - SECURITY_ATTRIBUTES* process_attributes,
|
| - SECURITY_ATTRIBUTES* thread_attributes,
|
| - const base::HandlesToInheritVector& handles_to_inherit,
|
| - DWORD creation_flags,
|
| - const base::char16* desktop_name,
|
| - base::win::ScopedHandle* process_out,
|
| - base::win::ScopedHandle* thread_out);
|
| +// The other parameters are passed directly to CreateProcessAsUser().
|
| +// If |inherit_handles| is true |g_inherit_handles_lock| should be taken while
|
| +// any inheritable handles are open.
|
| +bool LaunchProcessWithToken(const base::FilePath& binary,
|
| + const base::CommandLine::StringType& command_line,
|
| + HANDLE user_token,
|
| + SECURITY_ATTRIBUTES* process_attributes,
|
| + SECURITY_ATTRIBUTES* thread_attributes,
|
| + bool inherit_handles,
|
| + DWORD creation_flags,
|
| + const base::char16* desktop_name,
|
| + base::win::ScopedHandle* process_out,
|
| + base::win::ScopedHandle* thread_out);
|
|
|
| } // namespace remoting
|
|
|
|
|