| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ | 5 #ifndef REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ |
| 6 #define REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ | 6 #define REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // Creates a copy of the current process token for the given |session_id| so | 59 // Creates a copy of the current process token for the given |session_id| so |
| 60 // it can be used to launch a process in that session. | 60 // it can be used to launch a process in that session. |
| 61 bool CreateSessionToken(uint32 session_id, base::win::ScopedHandle* token_out); | 61 bool CreateSessionToken(uint32 session_id, base::win::ScopedHandle* token_out); |
| 62 | 62 |
| 63 // Launches |binary| in the security context of the user represented by | 63 // Launches |binary| in the security context of the user represented by |
| 64 // |user_token|. The session ID specified by the token is respected as well. | 64 // |user_token|. The session ID specified by the token is respected as well. |
| 65 // The other parameters are passed directly to CreateProcessAsUser(). | 65 // The other parameters are passed directly to CreateProcessAsUser(). |
| 66 // If |inherit_handles| is true |g_inherit_handles_lock| should be taken while | 66 // If |inherit_handles| is true |g_inherit_handles_lock| should be taken while |
| 67 // any inheritable handles are open. | 67 // any inheritable handles are open. |
| 68 bool LaunchProcessWithToken(const FilePath& binary, | 68 bool LaunchProcessWithToken(const base::FilePath& binary, |
| 69 const CommandLine::StringType& command_line, | 69 const CommandLine::StringType& command_line, |
| 70 HANDLE user_token, | 70 HANDLE user_token, |
| 71 SECURITY_ATTRIBUTES* process_attributes, | 71 SECURITY_ATTRIBUTES* process_attributes, |
| 72 SECURITY_ATTRIBUTES* thread_attributes, | 72 SECURITY_ATTRIBUTES* thread_attributes, |
| 73 bool inherit_handles, | 73 bool inherit_handles, |
| 74 DWORD creation_flags, | 74 DWORD creation_flags, |
| 75 const char16* desktop_name, | 75 const char16* desktop_name, |
| 76 base::win::ScopedHandle* process_out, | 76 base::win::ScopedHandle* process_out, |
| 77 base::win::ScopedHandle* thread_out); | 77 base::win::ScopedHandle* thread_out); |
| 78 | 78 |
| 79 } // namespace remoting | 79 } // namespace remoting |
| 80 | 80 |
| 81 #endif // REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ | 81 #endif // REMOTING_HOST_WIN_LAUNCH_PROCESS_WITH_TOKEN_H_ |
| OLD | NEW |