Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: sandbox/win/sandbox_poc/main_ui_window.cc

Issue 2130753002: Made setting lowbox token a warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted change to logging Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/sandbox_win.cc ('k') | sandbox/win/src/broker_services.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "sandbox/win/sandbox_poc/main_ui_window.h" 5 #include "sandbox/win/sandbox_poc/main_ui_window.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <CommCtrl.h> 8 #include <CommCtrl.h>
9 #include <commdlg.h> 9 #include <commdlg.h>
10 #include <stdarg.h> 10 #include <stdarg.h>
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 sandbox::USER_LOCKDOWN); 506 sandbox::USER_LOCKDOWN);
507 policy->SetAlternateDesktop(true); 507 policy->SetAlternateDesktop(true);
508 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW); 508 policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
509 509
510 // Set the rule to allow the POC dll to be loaded by the target. Note that 510 // Set the rule to allow the POC dll to be loaded by the target. Note that
511 // the rule allows 'all access' to the DLL, which could mean that the target 511 // the rule allows 'all access' to the DLL, which could mean that the target
512 // could modify the DLL on disk. 512 // could modify the DLL on disk.
513 policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, 513 policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
514 sandbox::TargetPolicy::FILES_ALLOW_ANY, dll_path_.c_str()); 514 sandbox::TargetPolicy::FILES_ALLOW_ANY, dll_path_.c_str());
515 515
516 sandbox::ResultCode result = broker_->SpawnTarget(spawn_target_.c_str(), 516 sandbox::ResultCode warning_result = sandbox::SBOX_ALL_OK;
517 arguments, policy, 517 DWORD last_error = ERROR_SUCCESS;
518 &target_); 518 sandbox::ResultCode result =
519 broker_->SpawnTarget(spawn_target_.c_str(), arguments, policy,
520 &warning_result, &last_error, &target_);
519 521
520 policy->Release(); 522 policy->Release();
521 policy = NULL; 523 policy = NULL;
522 524
523 bool return_value = false; 525 bool return_value = false;
524 if (sandbox::SBOX_ALL_OK != result) { 526 if (sandbox::SBOX_ALL_OK != result) {
525 AddDebugMessage( 527 AddDebugMessage(
526 L"Failed to spawn target %ls w/args (%ls), sandbox error code: %d", 528 L"Failed to spawn target %ls w/args (%ls), sandbox error code: %d",
527 spawn_target_.c_str(), arguments, result); 529 spawn_target_.c_str(), arguments, result);
528 return_value = false; 530 return_value = false;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 item.iItem = ListView_GetItemCount(list_view_); 656 item.iItem = ListView_GetItemCount(list_view_);
655 item.iSubItem = 0; 657 item.iSubItem = 0;
656 item.mask = LVIF_TEXT | LVIF_PARAM; 658 item.mask = LVIF_TEXT | LVIF_PARAM;
657 item.pszText = message_time; 659 item.pszText = message_time;
658 item.lParam = 0; 660 item.lParam = 0;
659 661
660 ListView_InsertItem(list_view_, &item); 662 ListView_InsertItem(list_view_, &item);
661 663
662 delete[] message_time; 664 delete[] message_time;
663 } 665 }
OLDNEW
« no previous file with comments | « content/common/sandbox_win.cc ('k') | sandbox/win/src/broker_services.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698