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

Unified Diff: src/plugin/PluginClass.cpp

Issue 5117917230268416: No issue - remove dead code (Closed)
Patch Set: Created Oct. 8, 2014, 2:46 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/PluginDomTraverser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1153,116 +1153,6 @@
return hMenuTrackPopup;
}
-BOOL CreateLowProcess(WCHAR* wszProcessName, WCHAR* cmdLine)
-{
-
- BOOL fRet;
- HANDLE hToken = NULL;
- HANDLE hNewToken = NULL;
- PSID pIntegritySid = NULL;
- TOKEN_MANDATORY_LABEL TIL = {0};
- PROCESS_INFORMATION ProcInfo = {0};
- STARTUPINFO StartupInfo = {0};
-
-
-
- // Low integrity SID
- WCHAR wszIntegritySid[20] = L"S-1-16-4096";
-
-
- fRet = OpenProcessToken(GetCurrentProcess(),
- TOKEN_DUPLICATE |
- TOKEN_ADJUST_DEFAULT |
- TOKEN_QUERY |
- TOKEN_ASSIGN_PRIMARY,
- &hToken);
-
- if (!fRet)
- {
- goto CleanExit;
- }
-
- fRet = DuplicateTokenEx(hToken,
- 0,
- NULL,
- SecurityImpersonation,
- TokenPrimary,
- &hNewToken);
-
- if (!fRet)
- {
- goto CleanExit;
- }
-
- fRet = ConvertStringSidToSid(wszIntegritySid, &pIntegritySid);
-
- if (!fRet)
- {
- goto CleanExit;
- }
-
-
- TIL.Label.Attributes = SE_GROUP_INTEGRITY;
- TIL.Label.Sid = pIntegritySid;
-
-
- //
- // Set the process integrity level
- //
-
- fRet = SetTokenInformation(hNewToken,
- TokenIntegrityLevel,
- &TIL,
- sizeof(TOKEN_MANDATORY_LABEL) + GetLengthSid(pIntegritySid));
-
- if (!fRet)
- {
- goto CleanExit;
- }
-
- //
- // Create the new process at Low integrity
- //
-
- fRet = CreateProcessAsUser(hNewToken,
- wszProcessName,
- cmdLine,
- NULL,
- NULL,
- FALSE,
- 0,
- NULL,
- NULL,
- &StartupInfo,
- &ProcInfo);
-
-
-CleanExit:
-
- if (ProcInfo.hProcess != NULL)
- {
- CloseHandle(ProcInfo.hProcess);
- }
-
- if (ProcInfo.hThread != NULL)
- {
- CloseHandle(ProcInfo.hThread);
- }
-
- LocalFree(pIntegritySid);
-
- if (hNewToken != NULL)
- {
- CloseHandle(hNewToken);
- }
-
- if (hToken != NULL)
- {
- CloseHandle(hToken);
- }
-
- return fRet;
-}
void CPluginClass::DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFlags)
{
« no previous file with comments | « adblockplus.gyp ('k') | src/plugin/PluginDomTraverser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld