Index: src/plugin/AdblockPlusClient.cpp |
=================================================================== |
--- a/src/plugin/AdblockPlusClient.cpp |
+++ b/src/plugin/AdblockPlusClient.cpp |
@@ -55,20 +55,19 @@ |
HANDLE newToken; |
DuplicateTokenEx(token, 0, 0, SecurityImpersonation, TokenPrimary, &newToken); |
- PSID pIntegritySid = 0; |
- BOOL res = ConvertStringSidToSid(L"S-1-16-4096", &pIntegritySid); |
- std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(pIntegritySid), FreeSid); // Just to simplify cleanup |
+ PSID integritySid = 0; |
+ ConvertStringSidToSid(L"S-1-16-4096", &integritySid); |
+ std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(integritySid), FreeSid); // Just to simplify cleanup |
- TOKEN_MANDATORY_LABEL tml = {0}; |
+ TOKEN_MANDATORY_LABEL tml = {}; |
tml.Label.Attributes = SE_GROUP_INTEGRITY; |
- tml.Label.Sid = pIntegritySid; |
+ tml.Label.Sid = integritySid; |
// Set the process integrity level |
- res = SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(TOKEN_MANDATORY_LABEL) + GetLengthSid(pIntegritySid)); |
+ SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(TOKEN_MANDATORY_LABEL) + GetLengthSid(integritySid)); |
STARTUPINFO startupInfo = {}; |
PROCESS_INFORMATION processInformation = {}; |
- BOOL createProcRes = 0; |
createProcRes = CreateProcessAsUserW(newToken, engineExecutablePath.c_str(), params.GetBuffer(params.GetLength() + 1), |
0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo, &processInformation); |