OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 //! | 138 //! |
139 //! \param[in] pipe_name The name to use for the pipe. | 139 //! \param[in] pipe_name The name to use for the pipe. |
140 //! \param[in] first_instance If `true`, the named pipe instance will be | 140 //! \param[in] first_instance If `true`, the named pipe instance will be |
141 //! created with `FILE_FLAG_FIRST_PIPE_INSTANCE`. This ensures that the the | 141 //! created with `FILE_FLAG_FIRST_PIPE_INSTANCE`. This ensures that the the |
142 //! pipe name is not already in use when created. The first instance will be | 142 //! pipe name is not already in use when created. The first instance will be |
143 //! created with an untrusted integrity SACL so instances of this pipe can | 143 //! created with an untrusted integrity SACL so instances of this pipe can |
144 //! be connected to by processes of any integrity level. | 144 //! be connected to by processes of any integrity level. |
145 HANDLE CreateNamedPipeInstance(const std::wstring& pipe_name, | 145 HANDLE CreateNamedPipeInstance(const std::wstring& pipe_name, |
146 bool first_instance); | 146 bool first_instance); |
147 | 147 |
| 148 //! \brief Returns the SECURITY_DESCRIPTOR blob that will be used for creating |
| 149 //! the connection pipe in CreateNamedPipeInstance(). |
| 150 //! |
| 151 //! This function is exposed for only for testing. |
| 152 //! |
| 153 //! \param[out] size The size of the returned blob. May be `nullptr` if not |
| 154 //! required. |
| 155 //! |
| 156 //! \return A pointer to a self-relative `SECURITY_DESCRIPTOR`. Ownership is not |
| 157 //! transferred to the caller. |
| 158 const void* GetSecurityDescriptorForNamedPipeInstance(size_t* size); |
| 159 |
148 } // namespace crashpad | 160 } // namespace crashpad |
149 | 161 |
150 #endif // CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_ | 162 #endif // CRASHPAD_UTIL_WIN_REGISTRATION_PROTOCOL_WIN_H_ |
OLD | NEW |