mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:35:45 +00:00
Open the process with enough privileges before adjusting them
svn path=/trunk/; revision=29160
This commit is contained in:
parent
2ff2329ed3
commit
0b3a854203
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable)
|
||||||
|
|
||||||
TRACE("%s %s\n", debugstr_w(lpPrivilegeName), bEnable ? "TRUE" : "FALSE");
|
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;
|
return FALSE;
|
||||||
|
|
||||||
Privileges.PrivilegeCount = 1;
|
Privileges.PrivilegeCount = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue