summaryrefslogtreecommitdiffstats
path: root/sandbox/src
Commit message (Collapse)AuthorAgeFilesLines
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-077-71/+22
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6816027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80851 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80819 due to failed testsmmenke@chromium.org2011-04-077-22/+71
| | | | | | | TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/6816024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80824 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-077-71/+22
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6713107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80819 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-2812-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Create a "GetWOW64Status()" utility function and make the rest of the ↵pkasting@chromium.org2011-03-045-74/+29
| | | | | | | | | | codebase call it. BUG=none TEST=none Review URL: http://codereview.chromium.org/6610029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76854 0039d316-1c4b-4281-b951-d872f2087c98
* Make SandboxInterfaceInfo somewhat backwards compatiblecpu@chromium.org2011-02-251-2/+7
| | | | | | | | | | | | | | Hack to allow a mismached chrome exe and dll (different versions) to not crash. The older chrome exe will pass a union, the new chrome dll expects a struct. BUG=74046 TEST=see bug Review URL: http://codereview.chromium.org/6598013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76108 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Make sure that we reset relative_jump_ beforervargas@google.com2011-02-253-13/+73
| | | | | | | | | | | | performing every patch. BUG=69952 TEST=sbox_unittests Review URL: http://codereview.chromium.org/6528033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76089 0039d316-1c4b-4281-b951-d872f2087c98
* Use a struct instead of a union for SandboxInterfaceInfocpu@chromium.org2011-02-101-2/+2
| | | | | | | | | | BUG=72496 TEST=see bug Review URL: http://codereview.chromium.org/6483006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74514 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-098-52/+56
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use ↵thakis@chromium.org2011-01-078-56/+52
| | | | | | | | | | the new location and namespace." This reverts r 70795, it broke the build. TBR=vandebo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_handle_win.h stub and fix up all callers to use the new ↵tfarina@chromium.org2011-01-078-52/+56
| | | | | | | | | | | location and namespace. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/platform_thread.h stub and fix up all callers to use the new ↵brettw@google.com2011-01-011-2/+2
| | | | | | | | | location and namespace. TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70346 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Fix the memory protection code to handle page boundaries.rvargas@google.com2010-12-281-1/+1
| | | | | | | | | BUG=43867 TEST=none Review URL: http://codereview.chromium.org/6034008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70233 0039d316-1c4b-4281-b951-d872f2087c98
* Windows Sandbox: Perform case insensitive tests when checkingrvargas@google.com2010-12-212-3/+32
| | | | | | | | | | | file handles to be returned to a sandboxed process. BUG=67215 TEST=sbox_unittests Review URL: http://codereview.chromium.org/5989004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69847 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid the use of wow_helper for Windows7cpu@chromium.org2010-10-291-2/+5
| | | | | | | | | | | | | | | In Windows7 64-bit the wow subsystem maps the 32 bit ntdll from the get go, so there is no need to use wow_helper at all. This also should speed process creation for chrome. BUG=60854 TEST=existing validation and integration tests suffice. Review URL: http://codereview.chromium.org/4185004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64446 0039d316-1c4b-4281-b951-d872f2087c98
* Add a bunch of missing bug references to FLAKY testsstuartmorgan@chromium.org2010-10-271-0/+1
| | | | | | | | | BUG=None TEST=N/A Review URL: http://codereview.chromium.org/4135007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64150 0039d316-1c4b-4281-b951-d872f2087c98
* Move pe_image and registry from base to base/win and use the namespace. It ↵brettw@chromium.org2010-10-178-16/+16
| | | | | | | | | | | | removes windows_message_list which isn't used. This keeps a stub for registry in the old location until we can update that. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3836005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62888 0039d316-1c4b-4281-b951-d872f2087c98
* Move windows version-related stuff out of base/win_util and into ↵brettw@chromium.org2010-10-155-23/+22
| | | | | | | | | | | | | | base/win/windows_version. Many files now only need to include this instead of all of win_util. Remove a bunch of unused code from base/win_util. There was a surprising amount. Replace the AppUserModel property key with the one from the SDK now that we use the Win7 SDK. Move GetLogonSessionOnlyDACL from win_util to ipc since it's only used in that one place. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62694 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 62205 - Make writing to stdout and stderr work in Chrome processes ↵isherman@chromium.org2010-10-121-5/+0
| | | | | | | | | | | | | | | | | | | | | when inherited handles are available. Don't create a console, just attach to any existing console. R=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/3574008 Reverting because it breaks browser_tests logging TBR=darin@chromium.org Review URL: http://codereview.chromium.org/3691005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62236 0039d316-1c4b-4281-b951-d872f2087c98
* Make writing to stdout and stderr work in Chrome processes when inheriteddarin@chromium.org2010-10-111-0/+5
| | | | | | | | | | | | | | handles are available. Don't create a console, just attach to any existing console. R=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/3574008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62205 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox change. Remove inheritance of the duplicated tokens.cpu@chromium.org2010-09-221-4/+4
| | | | | | | | | | | | | I don't think this is necessary at all and coult potentially leak tokens into other child processes. BUG=none TEST=run chrome, verify renderers are sandboxed Review URL: http://codereview.chromium.org/3386012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60136 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SameObject to not return false when the volume name returned by ↵nsylvain@chromium.org2010-09-161-1/+1
| | | | | | | | | QueryDosDevice ends with more than 2 NULL chars. Review URL: http://codereview.chromium.org/3429010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59719 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 7)thestig@chromium.org2010-08-271-2/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3176026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57737 0039d316-1c4b-4281-b951-d872f2087c98
* Sbox IPC fixcpu@chromium.org2010-08-203-40/+79
| | | | | | | | | | | | | | Second take, I had off-by-one bad check in line 164 for more info see review 3142022 BUG=52682 TEST=included Review URL: http://codereview.chromium.org/3130037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56938 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 56796 - Sbox IPC fixcpu@chromium.org2010-08-203-72/+39
| | | | | | | | | | | | | | | Tests failing on vista BUG=52682 TEST=included Review URL: http://codereview.chromium.org/3142022 TBR=cpu@chromium.org Review URL: http://codereview.chromium.org/3122031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56798 0039d316-1c4b-4281-b951-d872f2087c98
* Sbox IPC fixcpu@chromium.org2010-08-203-39/+72
| | | | | | | | | | BUG=52682 TEST=included Review URL: http://codereview.chromium.org/3142022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56796 0039d316-1c4b-4281-b951-d872f2087c98
* Allow native (nt-style) paths to be used for sandbox policy specificationcpu@chromium.org2010-08-074-17/+61
| | | | | | | | | | | | | 1- bypass fixup when adding the path into the policy 2- make SameObject() do case-insensitive perfect match BUG=50774 TEST= unit test included Review URL: http://codereview.chromium.org/3092014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55329 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 1)thestig@chromium.org2010-08-053-3/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3071012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55034 0039d316-1c4b-4281-b951-d872f2087c98
* Check the IPC filename length does not exceed the message size.jschuh@google.com2010-07-221-0/+5
| | | | | | | | BUG=49763 TEST=None. Review URL: http://codereview.chromium.org/2806067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53415 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compiler error in sandbox util in case exception is enabled.victorw@chromium.org2010-06-222-0/+12
| | | | | | | | | | | | | | | | | Add operator delete that matches the placement form of the operator new. This is required by compiler to generate code to call operator delete in case the object's constructor throws an exception. See http://msdn.microsoft.com/en-us/library/cxdxz3x6.aspx R=rvargas BUG=none TEST=sandbox code compiles if exception is enabled. Review URL: http://codereview.chromium.org/2870017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50486 0039d316-1c4b-4281-b951-d872f2087c98
* FAILS tests should not turn the bot red.vandebo@chromium.org2010-06-181-2/+2
| | | | | | | | | | | | | | | | | | | Revert 50258 - TTF: Reenable some disabled tests. DevToolsSanityTest.TestConsoleLog seems to work ProxyResolverV8Test.FAILS_ReturnUnicode DepTest.FAILS_TestDepDisable VectorCanvasTest.FAILS_Matrix TEST=none BUG=disabled tests Review URL: http://codereview.chromium.org/2819011 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/2862016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50261 0039d316-1c4b-4281-b951-d872f2087c98
* TTF: Reenable some disabled tests.vandebo@chromium.org2010-06-181-2/+2
| | | | | | | | | | | | | | DevToolsSanityTest.TestConsoleLog seems to work ProxyResolverV8Test.FAILS_ReturnUnicode DepTest.FAILS_TestDepDisable VectorCanvasTest.FAILS_Matrix TEST=none BUG=disabled tests Review URL: http://codereview.chromium.org/2819011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50258 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Chrome threads to use a "Cr" prefix.evan@chromium.org2010-06-091-1/+1
| | | | | | | | | | | Before we carefully used the app (Chrome/Chromium) name, but: 1) these are for internal debugging use only, so why compute this name 2) on Linux the thread ids are limited to 16 characters, and "Chromium" is too long Review URL: http://codereview.chromium.org/2741003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49296 0039d316-1c4b-4281-b951-d872f2087c98
* Use DISALLOW_COPY_AND_ASSIGN instead of DISALLOW_EVIL_CONSTRUCTORS in ↵tfarina@chromium.org2010-06-0520-45/+45
| | | | | | | | | | | sandbox directory. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/2643003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49010 0039d316-1c4b-4281-b951-d872f2087c98
* Implement most of the ridealong fixes/cleanups I suggested during review for ↵pkasting@chromium.org2010-06-012-9/+9
| | | | | | | | | | enabling warn-on-signed-versus-unsigned-equality-comparisions on Windows. BUG=none TEST=none Review URL: http://codereview.chromium.org/2395001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48666 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will make mbelshe@chromium.org2010-05-275-39/+39
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2222002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48395 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Another dependency the bbot missed!!!"rafaelw@chromium.org2010-05-265-39/+39
| | | | | | | | | | | | | | | | | | This reverts commit 161f7fd3bdd425167af9fe26fdc5373a2ff44c98. Revert "Missed a file as part of checkin for r48186" This reverts commit cff86beba5938209393a6c3bccced62a7f3ff36b. Revert "Enable warning 4389 as an error on windows builds. This will make" This reverts commit c78936bcfc65b98edf288191d927a495b0364621. TBR=mbelshe Review URL: http://codereview.chromium.org/2253001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48238 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will makembelshe@chromium.org2010-05-255-39/+39
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48186 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the POC and some of unit tests to be build andnsylvain@chromium.org2010-03-232-9/+8
| | | | | | | | | | run correctly in 64 bit. BUG=27218 Review URL: http://codereview.chromium.org/1168002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42392 0039d316-1c4b-4281-b951-d872f2087c98
* Marked UnloadDllTest.UnloadAviCapDllWithPatching as flaky.glider@chromium.org2010-03-171-1/+1
| | | | | | | | TBR=cpu Review URL: http://codereview.chromium.org/1002009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41832 0039d316-1c4b-4281-b951-d872f2087c98
* Third change to port sandbox to 64 bitscpu@chromium.org2010-03-164-27/+20
| | | | | | | | | | | | - Enable registry, file and event policy - Now sbox_integration_tests.exe runs and all tests pass BUG=27218 TEST=included Review URL: http://codereview.chromium.org/992003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41673 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land second sandbox round of changescpu@chromium.org2010-03-1317-160/+341
| | | | | | | | | | | | | | | | | | | | | - broke integration tests See http://codereview.chromium.org/757001 BUG=27218 TEST=included No change in the original files. The only changes are in the files: sandbox/src/registry_dispatcher.cc sandbox/src/registry_dispatcher.h sandbox/src/filesystem_dispatcher.cc Because now even in 32 bits the handles map to void pointers Review URL: http://codereview.chromium.org/873006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41523 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 41481 - Secound round of sbox changes for 64 bit portericu@google.com2010-03-1214-330/+143
| | | | | | | | | | | | | | | | | | Handling pointer sized items Beefing up unit tests Beefing up integration tests Enabling Process, Thread and Token IPCs Making validation tests compile again BUG=27218 TEST= unit tests included Review URL: http://codereview.chromium.org/757001 TBR=cpu@chromium.org Review URL: http://codereview.chromium.org/871008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41491 0039d316-1c4b-4281-b951-d872f2087c98
* Secound round of sbox changes for 64 bit portcpu@chromium.org2010-03-1214-143/+330
| | | | | | | | | | | | | | | - Handling pointer sized items - Beefing up unit tests - Beefing up integration tests - Enabling Process, Thread and Token IPCs - Making validation tests compile again BUG=27218 TEST= unit tests included Review URL: http://codereview.chromium.org/757001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41481 0039d316-1c4b-4281-b951-d872f2087c98
* Fix warning that is now an error.craig.schlenter@chromium.org2010-03-101-2/+1
| | | | | | | | C:\b\slave\chromium-rel-xp\build\src\sandbox\src\sandbox.cc(16) : warning C4010: single-line comment contains line-continuation character Review URL: http://codereview.chromium.org/788003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41164 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Add code for all the interceptors.rvargas@google.com2010-03-054-5/+308
| | | | | | | | | | | | Still waiting for IPC to be able to test anything. BUG=27218 TEST=none Review URL: http://codereview.chromium.org/669128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40700 0039d316-1c4b-4281-b951-d872f2087c98
* Porting sbox IPC to 64 bitcpu@chromium.org2010-03-038-45/+61
| | | | | | | | | | | | | | | | | -IPC unit tests enabled -Integration IPCTest test enabled -All unit test pass (62 tests) Other tests require interceptor fu. BUG=27218 TEST= unit tests included Review URL: http://codereview.chromium.org/661299 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40485 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-193-0/+3
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Some cleanup after the previous changes.rvargas@google.com2010-02-118-553/+461
| | | | | | | | | | | No real code change. BUG=27218 TEST=current tests. Review URL: http://codereview.chromium.org/597050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38837 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Add support for EAT interceptions in 64 bit.rvargas@google.com2010-02-107-20/+128
| | | | | | | | | | BUG=27218 TEST=manual integration tests. Review URL: http://codereview.chromium.org/600035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38681 0039d316-1c4b-4281-b951-d872f2087c98