mirror of
https://github.com/reactos/reactos.git
synced 2026-09-09 02:44:55 +08:00
Open the process with enough privileges before adjusting them
svn path=/trunk/; revision=29160
This commit is contained in:
@@ -432,7 +432,7 @@ BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable)
|
||||
|
||||
TRACE("%s %s\n", debugstr_w(lpPrivilegeName), bEnable ? "TRUE" : "FALSE");
|
||||
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
|
||||
return FALSE;
|
||||
|
||||
Privileges.PrivilegeCount = 1;
|
||||
|
||||
Reference in New Issue
Block a user