diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-30 13:26:36 +0100 |
---|---|---|
committer | Simon Rozman <simon@rozman.si> | 2020-10-31 10:41:49 +0100 |
commit | 8c935ce1517f4420ffd0a984e28a7a46a0c5837f (patch) | |
tree | e22c918d20f1cddcb17aec39b87352155111573e /api/namespace.c | |
parent | api: elevate only when needed for system operations (diff) | |
download | wintun-8c935ce1517f4420ffd0a984e28a7a46a0c5837f.tar.xz wintun-8c935ce1517f4420ffd0a984e28a7a46a0c5837f.zip |
api: remove security attributes debug trap door
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'api/namespace.c')
-rw-r--r-- | api/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/namespace.c b/api/namespace.c index 2daf2f3..86c279f 100644 --- a/api/namespace.c +++ b/api/namespace.c @@ -82,7 +82,7 @@ NamespaceRuntimeInit(void) for (;;) { - if (CreatePrivateNamespaceW(SecurityAttributes, Boundary, L"Wintun")) + if (CreatePrivateNamespaceW(&SecurityAttributes, Boundary, L"Wintun")) break; Result = GetLastError(); if (Result == ERROR_ALREADY_EXISTS) @@ -138,7 +138,7 @@ NamespaceTakeMutex(_In_z_ const WCHAR *Pool) memcpy(MutexName, MutexNamePrefix, sizeof(MutexNamePrefix) - sizeof(WCHAR)); Bin2Hex(Hash, sizeof(Hash), MutexName + _countof(MutexNamePrefix) - 1); MutexName[_countof(MutexName) - 1] = 0; - Mutex = CreateMutexW(SecurityAttributes, FALSE, MutexName); + Mutex = CreateMutexW(&SecurityAttributes, FALSE, MutexName); if (!Mutex) goto cleanupPoolNorm; switch (WaitForSingleObject(Mutex, INFINITE)) |