Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/AdblockPlusClient.cpp

Issue 4859386648330240: Fix named pipe security on Windows XP (Closed)
Patch Set: Created June 26, 2014, 12:57 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/shared/Communication.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
35 GetTokenInformation(token, TokenAppContainerSid, acs, length, &length) ; 35 GetTokenInformation(token, TokenAppContainerSid, acs, length, &length) ;
36 } 36 }
37 else 37 else
38 { 38 {
39 throw std::runtime_error("Out of memory"); 39 throw std::runtime_error("Out of memory");
40 } 40 }
41 } 41 }
42 42
43 BOOL createProcRes = 0; 43 BOOL createProcRes = 0;
44 // Running inside AppContainer or in Windows XP 44 // Running inside AppContainer or in Windows XP
45 if ((acs != NULL && acs->TokenAppContainer != NULL) || (!IsWindowsVistaOrLat er())) 45 if ((acs != NULL && acs->TokenAppContainer != NULL) || !IsWindowsVistaOrLate r())
46 { 46 {
47 // We need to break out from AppContainer. Launch with default security - registry entry will eat the user prompt 47 // We need to break out from AppContainer. Launch with default security - registry entry will eat the user prompt
48 // See http://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx#wpm_ elebp 48 // See http://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx#wpm_ elebp
49 createProcRes = CreateProcessW(engineExecutablePath.c_str(), params.GetBuf fer(params.GetLength() + 1), 49 createProcRes = CreateProcessW(engineExecutablePath.c_str(), params.GetBuf fer(params.GetLength() + 1),
50 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo, &processInformation); 50 0, 0, false, 0, 0, 0, (STARTUPINFOW*)&startupInfo, &processInformation);
51 } 51 }
52 else 52 else
53 { 53 {
54 // Launch with Low Integrity explicitly 54 // Launch with Low Integrity explicitly
55 HANDLE newToken; 55 HANDLE newToken;
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 Communication::OutputBuffer request; 519 Communication::OutputBuffer request;
520 request << Communication::PROC_GET_HOST << ToUtf8String(url); 520 request << Communication::PROC_GET_HOST << ToUtf8String(url);
521 521
522 Communication::InputBuffer response; 522 Communication::InputBuffer response;
523 if (!CallEngine(request, response)) 523 if (!CallEngine(request, response))
524 return L""; 524 return L"";
525 std::string host; 525 std::string host;
526 response >> host; 526 response >> host;
527 return ToUtf16String(host); 527 return ToUtf16String(host);
528 } 528 }
OLDNEW
« no previous file with comments | « no previous file | src/shared/Communication.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld