Author: hpoussin
Date: Sun Sep 23 17:14:03 2007
New Revision: 29160
URL:
http://svn.reactos.org/svn/reactos?rev=29160&view=rev
Log:
Open the process with enough privileges before adjusting them
Modified:
trunk/reactos/dll/win32/setupapi/misc.c
Modified: trunk/reactos/dll/win32/setupapi/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/misc.c?…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/misc.c (original)
+++ trunk/reactos/dll/win32/setupapi/misc.c Sun Sep 23 17:14:03 2007
@@ -432,7 +432,7 @@
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;