diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Common/Dlgcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 488b050f..269817d8 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -13706,11 +13706,11 @@ BOOL SetPrivilege(LPTSTR szPrivilegeName, BOOL bEnable) &tkp.Privileges[0].Luid)) { tkp.PrivilegeCount = 1; - tkp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : SE_PRIVILEGE_REMOVED; + tkp.Privileges[0].Attributes = bEnable? SE_PRIVILEGE_ENABLED : 0; bRet = AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL); dwLastError = GetLastError (); - if ( ERROR_SUCCESS != dwLastError) + if (bRet && (ERROR_NOT_ALL_ASSIGNED == dwLastError)) { bRet = FALSE; } |