| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 #include "PluginSettings.h" | 2 #include "PluginSettings.h" |
| 3 #include "PluginSystem.h" | 3 #include "PluginSystem.h" |
| 4 #include "PluginFilter.h" | 4 #include "PluginFilter.h" |
| 5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" |
| 6 #include "PluginMutex.h" | 6 #include "PluginMutex.h" |
| 7 #include "PluginClass.h" | 7 #include "PluginClass.h" |
| 8 | 8 |
| 9 #include "AdblockPlusClient.h" | 9 #include "AdblockPlusClient.h" |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 PSID integritySid = 0; | 58 PSID integritySid = 0; |
| 59 ConvertStringSidToSid(L"S-1-16-4096", &integritySid); | 59 ConvertStringSidToSid(L"S-1-16-4096", &integritySid); |
| 60 std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(integritySi
d), FreeSid); // Just to simplify cleanup | 60 std::tr1::shared_ptr<SID> sharedIntegritySid(static_cast<SID*>(integritySi
d), FreeSid); // Just to simplify cleanup |
| 61 | 61 |
| 62 TOKEN_MANDATORY_LABEL tml = {}; | 62 TOKEN_MANDATORY_LABEL tml = {}; |
| 63 tml.Label.Attributes = SE_GROUP_INTEGRITY; | 63 tml.Label.Attributes = SE_GROUP_INTEGRITY; |
| 64 tml.Label.Sid = integritySid; | 64 tml.Label.Sid = integritySid; |
| 65 | 65 |
| 66 // Set the process integrity level | 66 // Set the process integrity level |
| 67 SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(TOKEN_MAND
ATORY_LABEL) + GetLengthSid(integritySid)); | 67 SetTokenInformation(newToken, TokenIntegrityLevel, &tml, sizeof(tml)); |
| 68 | 68 |
| 69 STARTUPINFO startupInfo = {}; | 69 STARTUPINFO startupInfo = {}; |
| 70 PROCESS_INFORMATION processInformation = {}; | 70 PROCESS_INFORMATION processInformation = {}; |
| 71 | 71 |
| 72 createProcRes = CreateProcessAsUserW(newToken, engineExecutablePath.c_str(
), params.GetBuffer(params.GetLength() + 1), | 72 createProcRes = CreateProcessAsUserW(newToken, engineExecutablePath.c_str(
), params.GetBuffer(params.GetLength() + 1), |
| 73 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo,
&processInformation); | 73 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo,
&processInformation); |
| 74 } | 74 } |
| 75 | 75 |
| 76 if (!createProcRes) | 76 if (!createProcRes) |
| 77 { | 77 { |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 DEBUG_GENERAL("CompareVersions"); | 570 DEBUG_GENERAL("CompareVersions"); |
| 571 Communication::OutputBuffer request; | 571 Communication::OutputBuffer request; |
| 572 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); | 572 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); |
| 573 Communication::InputBuffer response; | 573 Communication::InputBuffer response; |
| 574 if (!CallEngine(request, response)) | 574 if (!CallEngine(request, response)) |
| 575 return 0; | 575 return 0; |
| 576 int result; | 576 int result; |
| 577 response >> result; | 577 response >> result; |
| 578 return result; | 578 return result; |
| 579 } | 579 } |
| OLD | NEW |