| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <windows.h> | 5 #include <windows.h> |
| 6 #include <CommCtrl.h> | 6 #include <CommCtrl.h> |
| 7 #include <commdlg.h> | 7 #include <commdlg.h> |
| 8 #include <time.h> | 8 #include <time.h> |
| 9 #include <windowsx.h> | 9 #include <windowsx.h> |
| 10 #include <atlbase.h> | 10 #include <atlbase.h> |
| 11 #include <atlsecurity.h> | 11 #include <atlsecurity.h> |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 wnsprintf(arguments, static_cast<int>(size_call), L"%ls %ls \"%ls\" %ls", | 502 wnsprintf(arguments, static_cast<int>(size_call), L"%ls %ls \"%ls\" %ls", |
| 503 spawn_target_.c_str(), entry_point_.c_str(), | 503 spawn_target_.c_str(), entry_point_.c_str(), |
| 504 dll_path_.c_str(), log_pipe); | 504 dll_path_.c_str(), log_pipe); |
| 505 | 505 |
| 506 arguments[size_call - 1] = L'\0'; | 506 arguments[size_call - 1] = L'\0'; |
| 507 | 507 |
| 508 sandbox::TargetPolicy* policy = broker_->CreatePolicy(); | 508 sandbox::TargetPolicy* policy = broker_->CreatePolicy(); |
| 509 policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0); | 509 policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0); |
| 510 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, | 510 policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, |
| 511 sandbox::USER_LOCKDOWN); | 511 sandbox::USER_LOCKDOWN); |
| 512 policy->SetDesktop(L"random_desktop_name"); | 512 policy->SetAlternateDesktop(true); |
| 513 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); | 513 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); |
| 514 | 514 |
| 515 // Set the rule to allow the POC dll to be loaded by the target. Note that | 515 // Set the rule to allow the POC dll to be loaded by the target. Note that |
| 516 // the rule allows 'all access' to the DLL, which could mean that the target | 516 // the rule allows 'all access' to the DLL, which could mean that the target |
| 517 // could modify the DLL on disk. | 517 // could modify the DLL on disk. |
| 518 policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, | 518 policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, |
| 519 sandbox::TargetPolicy::FILES_ALLOW_ANY, dll_path_.c_str()); | 519 sandbox::TargetPolicy::FILES_ALLOW_ANY, dll_path_.c_str()); |
| 520 | 520 |
| 521 sandbox::ResultCode result = broker_->SpawnTarget(spawn_target_.c_str(), | 521 sandbox::ResultCode result = broker_->SpawnTarget(spawn_target_.c_str(), |
| 522 arguments, policy, | 522 arguments, policy, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 item.iItem = ListView_GetItemCount(list_view_); | 659 item.iItem = ListView_GetItemCount(list_view_); |
| 660 item.iSubItem = 0; | 660 item.iSubItem = 0; |
| 661 item.mask = LVIF_TEXT | LVIF_PARAM; | 661 item.mask = LVIF_TEXT | LVIF_PARAM; |
| 662 item.pszText = message_time; | 662 item.pszText = message_time; |
| 663 item.lParam = 0; | 663 item.lParam = 0; |
| 664 | 664 |
| 665 ListView_InsertItem(list_view_, &item); | 665 ListView_InsertItem(list_view_, &item); |
| 666 | 666 |
| 667 delete[] message_time; | 667 delete[] message_time; |
| 668 } | 668 } |
| OLD | NEW |