api: constify pool argument

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-11-03 12:45:38 +01:00
parent 8963f7258e
commit 080b6896e0
4 changed files with 5 additions and 5 deletions

View File

@ -1744,7 +1744,7 @@ cleanupToken:
}
static WINTUN_STATUS
DeleteAllOurAdapters(_In_ WCHAR Pool[WINTUN_MAX_POOL], _Inout_ BOOL *RebootRequired)
DeleteAllOurAdapters(_In_ const WCHAR Pool[WINTUN_MAX_POOL], _Inout_ BOOL *RebootRequired)
{
HANDLE Mutex = NamespaceTakePoolMutex(Pool);
if (!Mutex)
@ -1802,7 +1802,7 @@ DeleteAllOurAdapters(_In_ WCHAR Pool[WINTUN_MAX_POOL], _Inout_ BOOL *RebootRequi
}
WINTUN_STATUS WINAPI
WintunDeletePoolDriver(_In_z_ WCHAR Pool[WINTUN_MAX_POOL], _Out_opt_ BOOL *RebootRequired)
WintunDeletePoolDriver(_In_z_ const WCHAR Pool[WINTUN_MAX_POOL], _Out_opt_ BOOL *RebootRequired)
{
if (!ElevateToSystem())
return LOG_LAST_ERROR(L"Failed to impersonate SYSTEM user");

View File

@ -61,4 +61,4 @@ WintunDeleteAdapter(_In_ const WINTUN_ADAPTER *Adapter, _In_ BOOL ForceCloseSess
* @copydoc WINTUN_DELETE_POOL_DRIVER_FUNC
*/
WINTUN_STATUS WINAPI
WintunDeletePoolDriver(_In_z_ WCHAR Pool[WINTUN_MAX_POOL], _Out_opt_ BOOL *RebootRequired);
WintunDeletePoolDriver(_In_z_ const WCHAR Pool[WINTUN_MAX_POOL], _Out_opt_ BOOL *RebootRequired);

View File

@ -306,7 +306,7 @@ cleanupArgv:
}
static WINTUN_STATUS
DeletePoolDriverViaRundll32(_In_z_ WCHAR Pool[WINTUN_MAX_POOL], _Inout_ BOOL *RebootRequired)
DeletePoolDriverViaRundll32(_In_z_ const WCHAR Pool[WINTUN_MAX_POOL], _Inout_ BOOL *RebootRequired)
{
LOG(WINTUN_LOG_INFO, L"Spawning native process");

View File

@ -82,7 +82,7 @@ typedef WINTUN_STATUS(WINAPI *WINTUN_DELETE_ADAPTER_FUNC)(
* @return ERROR_SUCCESS on success; Win32 error code otherwise.
*/
typedef WINTUN_STATUS(WINAPI *WINTUN_DELETE_POOL_DRIVER_FUNC)(
_In_z_ WCHAR Pool[WINTUN_MAX_POOL],
_In_z_ const WCHAR Pool[WINTUN_MAX_POOL],
_Out_opt_ BOOL *RebootRequired);
/**