diff options
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 34ade2c..735e585 100644 --- a/api/namespace.c +++ b/api/namespace.c @@ -59,8 +59,8 @@ static _Return_type_success_(return != FALSE) BOOL NamespaceRuntimeInit(void) } BYTE Sid[MAX_SID_SIZE]; - DWORD SidSize = MAX_SID_SIZE; - if (!CreateWellKnownSid(WinLocalSystemSid, NULL, Sid, &SidSize)) + DWORD SidSize = sizeof(Sid); + if (!CreateWellKnownSid(IsLocalSystem ? WinLocalSystemSid : WinBuiltinAdministratorsSid, NULL, Sid, &SidSize)) { LastError = LOG_LAST_ERROR(L"Failed to create SID"); goto cleanupBCryptCloseAlgorithmProvider; |