summaryrefslogtreecommitdiffstats
path: root/sandbox
Commit message (Collapse)AuthorAgeFilesLines
* Use an alternate mechanism for CreateFile calls in Chromecaitkp@chromium.org2014-02-021-0/+10
| | | | | | | | | | | | BUG=334379 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245464 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246313 Review URL: https://codereview.chromium.org/138593004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248380 0039d316-1c4b-4281-b951-d872f2087c98
* Fix nit introduced in r247511wfh@chromium.org2014-01-291-2/+2
| | | | | | | | | BUG=334897 TBR=rvargas@chromium.org Review URL: https://codereview.chromium.org/149513004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247725 0039d316-1c4b-4281-b951-d872f2087c98
* Don't link gtest into sandbox libscottmg@chromium.org2014-01-291-1/+0
| | | | | | | | | | | I contend we probably don't want to ship gtest? R=jschuh@chromium.org BUG=329384 Review URL: https://codereview.chromium.org/132283008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247657 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly test for canonicalized path in the CreateNamedPipe policy engine.wfh@chromium.org2014-01-282-7/+96
| | | | | | | | | BUG=334897 TEST=sbox_integration_tests.exe Review URL: https://codereview.chromium.org/145553007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247511 0039d316-1c4b-4281-b951-d872f2087c98
* Disable libc urandom overrides under MSan.earthdok@chromium.org2014-01-281-6/+6
| | | | | | | | | BUG=123263, 178409 TBR=jln@chromium.org Review URL: https://codereview.chromium.org/137423012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247452 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 246313 "Use an alternate mechanism for CreateFile calls i..."kochi@google.com2014-01-231-10/+0
| | | | | | | | | | | | | | | | | | This caused reading profile error on Windows8 platform. > Use an alternate mechanism for CreateFile calls in Chrome > > BUG=334379 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245464 > > Review URL: https://codereview.chromium.org/138593004 TBR=caitkp@chromium.org Review URL: https://codereview.chromium.org/144333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246541 0039d316-1c4b-4281-b951-d872f2087c98
* Use an alternate mechanism for CreateFile calls in Chromecaitkp@chromium.org2014-01-221-0/+10
| | | | | | | | | | BUG=334379 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245464 Review URL: https://codereview.chromium.org/138593004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246313 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 245464 "Use an alternate mechanism for CreateFile calls i..."jochen@chromium.org2014-01-171-10/+0
| | | | | | | | | | | | | | | | ChromeCreateFileTest.CheckWriteAndReadParams crashes on Vista > Use an alternate mechanism for CreateFile calls in Chrome > > BUG=334379 > > Review URL: https://codereview.chromium.org/138593004 TBR=caitkp@chromium.org Review URL: https://codereview.chromium.org/140783009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245501 0039d316-1c4b-4281-b951-d872f2087c98
* Use an alternate mechanism for CreateFile calls in Chromecaitkp@chromium.org2014-01-171-0/+10
| | | | | | | | BUG=334379 Review URL: https://codereview.chromium.org/138593004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245464 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Win64 build of base library even in a Win32 build.petewil@chromium.org2014-01-091-1/+1
| | | | | | | | | | | | | | | Some components of a 32 bit build of chrome for Windows need to be built as Win64 Dlls. To allow those components to use base, we make a Win64 build of the base library even when building chrome 32 bit. This is needed by the Chrome Desk Band code. crbug.com/327435. https://codereview.chromium.org/79173004/ BUG=327435 Review URL: https://codereview.chromium.org/103333004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243936 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 'using base::string16;' from base/strings/string16.h and remove temporarydbeam@chromium.org2013-12-301-1/+1
| | | | | | | | | | | | PRESUBMIT.py _CheckForString16(). R=brettw@chromium.org, maruel@chromium.org TBR=sky@chromium.org, tsepez@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/93903011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242733 0039d316-1c4b-4281-b951-d872f2087c98
* Update some uses of char16 to use the base:: namespace.avi@chromium.org2013-12-257-49/+52
| | | | | | | | | | BUG=329295 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/111373008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242507 0039d316-1c4b-4281-b951-d872f2087c98
* Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, ↵avi@chromium.org2013-12-251-37/+0
| | | | | | | | | | | | sandbox/, skia/, sql/, sync/, tools/, webkit/, win8/ to use the base:: namespace. BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/121123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242502 0039d316-1c4b-4281-b951-d872f2087c98
* Add base:: to string16s in sandbox/.dbeam@chromium.org2013-12-2013-69/+73
| | | | | | | | | R=rvargas@chromium.org, nsylvain@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/119713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242214 0039d316-1c4b-4281-b951-d872f2087c98
* sandbox: Remove a TEXTREL on Linux ARM.rsesek@chromium.org2013-12-202-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android, the sandbox logic is put into a shared library and the linker errors out on having a TEXTREL. The LDR pseudo-instruction directs the assembler to place the address of the label in a "literal pool"[1], and then use a PC-relative load from that pool to get the address during execution. The pool is responsible for generating the R_ARM_RELATIVE TEXTREL. Using the ADR instruction[2] does not produce the TEXTREL. This instruction directs the assembler to calculate the PC-relative address to the label using an immediate. The text makes this difference more clear: ... 8: 4805 ldr r0, [pc, #20] ; (20 <SyscallAsm+0x20>) a: e007 b.n 1c <SyscallAsm+0x1c> ... 1c: bd80 pop {r7, pc} 1e: 0000 .short 0x0000 20: 0000001c .word 0x0000001c Versus: ... 8: 4804 ldr r0, [pc, #16] ; (1c <SyscallAsm+0x1c>) a: e007 b.n 1c <SyscallAsm+0x1c> ... 1c: bd80 pop {r7, pc} 1e: bf00 nop [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0041c/Babbfdih.html [2] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0040d/Cihdhgbe.html BUG=308763 Review URL: https://codereview.chromium.org/119453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242141 0039d316-1c4b-4281-b951-d872f2087c98
* Make building seccomp-bpf a GYP conditionjln@chromium.org2013-12-192-11/+4
| | | | | | | | | | | | | | | | We add a use_seccomp_bpf variable to allow not building seccomp-bpf. We make sure that it can't be use by mistake with sanity checks that the architecture is MIPS. BUG=267179 TEST=Use "GYP_DEFINES='use_seccomp_bpf=0' and comment out the two #error. about:sandbox should say that seccomp-bpf is disabled. Review URL: https://codereview.chromium.org/117803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241949 0039d316-1c4b-4281-b951-d872f2087c98
* ARM Linux sandbox: make sure r7 is marked as clobberedjln@chromium.org2013-12-191-2/+2
| | | | | | | | | | | Due to a typo, on ARM, the r7 register wasn't marked as clobbered. (found by rsesek@) R=rsesek@chromium.org Review URL: https://codereview.chromium.org/118743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241931 0039d316-1c4b-4281-b951-d872f2087c98
* Making sandbox error message on moving to namespaces more accurate.mithro@mithis.com2013-12-181-1/+13
| | | | | | | | | | | | | | When trying to move to new namespaces if a feature is supported but doesn't work we fail with an error message. The old error message was always "Failed to move to new PID namespace" but the cause could be a failure to move to a new "network namespace". BUG=326039 Review URL: https://codereview.chromium.org/102723004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241450 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: mark Markus as "emeritus" owner.jln@chromium.org2013-12-171-2/+3
| | | | | | | | TBR=markus Review URL: https://codereview.chromium.org/100023007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241376 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 240670 "Revert 239894 "Linux Sandbox: check no threads be..."jln@chromium.org2013-12-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | > Revert 239894 "Linux Sandbox: check no threads before fork()." > > BUG=327241, 328249 > > > Linux Sandbox: check no threads before fork(). > > > > Always check that no threads are running before fork(). > > > > BUG=327241 > > NOTRY=true > > > > Review URL: https://codereview.chromium.org/108173008 > > TBR=jln@chromium.org > > Review URL: https://codereview.chromium.org/106903012 TBR=jln@chromium.org Review URL: https://codereview.chromium.org/100623014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240961 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 239894 "Linux Sandbox: check no threads before fork()."jln@chromium.org2013-12-132-6/+0
| | | | | | | | | | | | | | | | | | | BUG=327241, 328249 > Linux Sandbox: check no threads before fork(). > > Always check that no threads are running before fork(). > > BUG=327241 > NOTRY=true > > Review URL: https://codereview.chromium.org/108173008 TBR=jln@chromium.org Review URL: https://codereview.chromium.org/106903012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240670 0039d316-1c4b-4281-b951-d872f2087c98
* Replace wstring with string16 in sandboxbrettw@chromium.org2013-12-1253-209/+246
| | | | | | | | | BUG= R=cpu@chromium.org Review URL: https://codereview.chromium.org/113173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240429 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: Deprecate compatibility APIjln@chromium.org2013-12-102-13/+0
| | | | | | | | | | | | Now that all BPF policies are migrated, remove stubs of old API. BUG=325535 NOTRY=true R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/108563007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239909 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: check no threads before fork().jln@chromium.org2013-12-102-0/+6
| | | | | | | | | | | Always check that no threads are running before fork(). BUG=327241 NOTRY=true Review URL: https://codereview.chromium.org/108173008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239894 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: cleanup sandbox-bpf naming.jln@chromium.org2013-12-1032-314/+299
| | | | | | | | | | | | | | | | | 1. Rename playground2 namespace to sandbox. The playground2 namespace is confusing and against the style guide. We rename it to sandbox, like the rest of sandbox/linux/. 2. Rename the "Sandbox" class to "SandboxBPF". BUG=325535 R=rsesek@chromium.org TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/101773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239865 0039d316-1c4b-4281-b951-d872f2087c98
* Linux Sandbox: move NaCl to new BPF policy format.jln@chromium.org2013-12-103-28/+3
| | | | | | | | | | | Migrate NaCl to the new BPF policies format. BUG=325535, 267179 R=mseaborn@chromium.org, piman@chromium.org, rsesek@chromium.org Review URL: https://codereview.chromium.org/110833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239650 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: migrate policies to new format.jln@chromium.org2013-12-095-138/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | seccomp-bpf policies are now the implementation of the interface that lives in sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h Sandbox policies inside content/ will all derive from the SandboxBpfBasePolicy (sandbox_bpf_base_policy.h) class. We can now rely on real C++ inheritance to implement our policy hierarchy. This is a first CL, part of a larger refactor. It should help minmize the risk of error and facilitate review by keeping the general layout of the code similar. In upcoming changes, we will: 1. Migrate NaCl and get rid of the compatibility / deprecated interfaces. 2. Extend the interface of SandboxBpfBasePolicy to be compatible with starting a GPU sandbox and reflect all the steps. 3. Move all the policies to directories such as renderer/ and gpu/ and each policy class will be able to live in its own file. BUG=325535 R=creis@chromium.org, jorgelo@chromium.org, mseaborn@chromium.org, rsesek@chromium.org Review URL: https://codereview.chromium.org/105673005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239550 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://chromiumcodereview.appspot.com/103293003/jln@chromium.org2013-12-064-5/+23
| | | | | | | | | | | | Reason for revert: http://goo.gl/3ufXOJ TBR=rsesek@chromium.org,willchan@chromium.org,darin@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/108013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239153 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 239102 "Move build/build_config_functions.h to sandbox/"rlarocque@chromium.org2013-12-063-89/+3
| | | | | | | | | | | | | | | | | > Move build/build_config_functions.h to sandbox/ > > There is not much support for build/build_config_functions.h, > as highlighted in http://goo.gl/3ufXOJ. Move it away. > > R=jww@chromium.org > > Review URL: https://codereview.chromium.org/106163008 TBR=jln@chromium.org Review URL: https://codereview.chromium.org/107643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239105 0039d316-1c4b-4281-b951-d872f2087c98
* Move build/build_config_functions.h to sandbox/jln@chromium.org2013-12-063-3/+89
| | | | | | | | | | | There is not much support for build/build_config_functions.h, as highlighted in http://goo.gl/3ufXOJ. Move it away. R=jww@chromium.org Review URL: https://codereview.chromium.org/106163008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239102 0039d316-1c4b-4281-b951-d872f2087c98
* Add build_config_functions.h to avoid #ifdefjln@chromium.org2013-12-064-23/+5
| | | | | | | | | | | | | | | | | | An "#ifdef" statement is more confusing than using C++ syntax and "if (XXX)". They should be used only when strictly necessary (i.e. when code cannot compile). For the cases where #ifdef are not strictly necessary, these new helpers can be used. Thanks to compiler optimization, the final compiled code will be the same when these helpers are used instead of #ifdef. R=rsesek@chromium.org Review URL: https://codereview.chromium.org/103293003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239079 0039d316-1c4b-4281-b951-d872f2087c98
* Move more helpers to seccomp-bpf-helpers.jln@chromium.org2013-12-056-3/+477
| | | | | | | | | | | | | Extract more code from content/common/sandbox_seccomp_bpf_linux.cc and move it to sandbox/linux/seccomp-bpf-helpers/ BUG=325535 NOTRY=true R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/98373007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238994 0039d316-1c4b-4281-b951-d872f2087c98
* Add "cc" to inline asm clobber list.eugenis@chromium.org2013-12-051-3/+3
| | | | | | | | | | | | SyscallAsm() clobbers the flags register. BUG=325707 TEST=sandbox_linux_unittests on Android with AddressSanitizer R=markus@chromium.org Review URL: https://codereview.chromium.org/104613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238944 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: move system call sets to sandbox/jln@chromium.org2013-12-053-0/+1094
| | | | | | | | | | | | | Extract system call sets from content/ and move them to sandbox. This is a re-land of https://codereview.chromium.org/103323003/. BUG=325535 TBR=jorgelo@chromium.org Review URL: https://codereview.chromium.org/105913002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238842 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/103323003/robliao@chromium.org2013-12-043-1092/+0
| | | | | | | | | | | | Reason for revert: Breaking ChromiumOS Build TBR=jorgelo@chromium.org,jln@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/105503003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238781 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: move system call sets to sandbox/jln@chromium.org2013-12-043-0/+1092
| | | | | | | | | | | Extract system call sets from content/ and move them to sandbox. BUG=325535 R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/103323003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238742 0039d316-1c4b-4281-b951-d872f2087c98
* Restructure sandbox code to reduce dependencies pulled in by intercept code.robertshield@chromium.org2013-12-0415-36/+101
| | | | | | | | | BUG=322710 TEST=NONE Review URL: https://codereview.chromium.org/84063004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238538 0039d316-1c4b-4281-b951-d872f2087c98
* Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.mark@chromium.org2013-12-037-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to wrap close in HANDLE_EINTR on Linux. Correctness is generally undefined on Mac, but as of r223369, it is incorrect in Chrome on Mac. To avoid new offenders, a PRESUBMIT check ensures that HANDLE_EINTR is not used with close, and that IGNORE_EINTR is only used with close. Unnecessary #includes of eintr_wrapper.h are also removed. base/posix/einter_wrapper.h, PRESUBMIT.py, and ppapi/tests/test_broker.cc contain non-mechanical changes. Variable naming within the latter is updated per r178174. Missing #includes for <errno.h> in content/zygote/zygote_main_linux.cc and tools/android/common/daemon.cc were manually added. Mechanical changes were generated by running: sed -E -i '' \ -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \ -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \ -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \ $(git grep -El 'HANDLE_EINTR.*close') sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \ $(grep -EL '(HANDLE|IGNORE)_EINTR' \ $(git grep -El '#include.*eintr_wrapper\.h"')) BUG=269623 R=agl@chromium.org, jln@chromium.org TBR=OWNERS Review URL: https://codereview.chromium.org/100253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238390 0039d316-1c4b-4281-b951-d872f2087c98
* DPCHECK known conditions when we guess false in CurrentProcessHasOpenDirectoriesmostynb@opera.com2013-11-281-2/+8
| | | | | | | | | | | | | | | openat(AT_FDCWD, "/proc/self/fd", ...) can fail if we have been chrooted (eg into /proc/self/fdinfo) without directory listing permissions on the new root dir (hence EACCES). And even if we did have this permission, /proc wouldn't exist (hence ENOENT). TEST=Make a debug build or a release build with dcheck_always_on=1 and verify that this DPCHECK does not fail. BUG=314985 Review URL: https://codereview.chromium.org/59763014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237766 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: init_process_reaper comment cleanup.jln@chromium.org2013-11-281-7/+5
| | | | | | | | | | Cleanup a few comments in init_process_reaper.cc BUG=312380 Review URL: https://codereview.chromium.org/92963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237723 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Remove Receive() from ScopedHandle.rvargas@chromium.org2013-11-286-23/+37
| | | | | | | | | | | | | | | | | | In general, the OS API contract doesn't guarantee that output variables are not modified on failure, so a Reeceive pattern is fundamentally insecure. BUG=318531 TEST=current tests tbr'ing owners for the consumers. TBR=jvoung@chromium.org, thakis@chromium.org, sergeyu@chromium.org, grt@chromium.org, gene@chromium.org, youngki@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237459 Review URL: https://codereview.chromium.org/71013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237675 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/71013004/hashimoto@chromium.org2013-11-276-37/+23
| | | | | | | | | | | | Reason for revert: Causing compile failure in chrome_util.cc on "Google Chrome Win" http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/21803 TBR=cpu@chromium.org,jvoung@chromium.org,thakis@chromium.org,sergeyu@chromium.org,grt@chromium.org,gene@chromium.org,youngki@chromium.org,rvargas@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/90963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237541 0039d316-1c4b-4281-b951-d872f2087c98
* Extract CreateInitProcessReaper() from the Zygote.jln@chromium.org2013-11-275-0/+141
| | | | | | | | | | | | | | | CreateInitProcessReaper() is useful for the CLONE_NEWUSER-based sandbox as well as for the current Zygote. Extract it so that it can be used independantly of content/. CreateInitProcessReaper() is now exposed to content through the setuid sandbox client. BUG=312380 Review URL: https://codereview.chromium.org/90243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237518 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Remove Receive() from ScopedHandle.rvargas@chromium.org2013-11-276-23/+37
| | | | | | | | | | | | | | | | In general, the OS API contract doesn't guarantee that output variables are not modified on failure, so a Reeceive pattern is fundamentally insecure. BUG=318531 TEST=current tests tbr'ing owners for the consumers. TBR=jvoung@chromium.org, thakis@chromium.org, sergeyu@chromium.org, grt@chromium.org, gene@chromium.org, youngki@chromium.org Review URL: https://codereview.chromium.org/71013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237459 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: move CurrentProcessHasOpenDirectoriesjln@chromium.org2013-11-263-3/+121
| | | | | | | | | | | | | | | Move CurrentProcessHasOpenDirectories() to the Credentials class and rename it to HasOpenDirectory(). Also add some unittests. This is a re-land of https://codereview.chromium.org/85403011/. BUG=312380 R=jorgelo@chromium.org, mmoss@google.com Review URL: https://codereview.chromium.org/88243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237390 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 237242 "Linux sandbox: move CurrentProcessHasOpenDirectories"jln@chromium.org2013-11-263-121/+3
| | | | | | | | | | | | | | | | | | | > Linux sandbox: move CurrentProcessHasOpenDirectories > > Move CurrentProcessHasOpenDirectories() to the Credentials class and rename > it to HasOpenDirectory(). > Also add some unittests. > > BUG=312380 > R=jorgelo@chromium.org > > Review URL: https://codereview.chromium.org/85403011 TBR=jln@chromium.org Review URL: https://codereview.chromium.org/85343005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237251 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: move CurrentProcessHasOpenDirectoriesjln@chromium.org2013-11-263-3/+121
| | | | | | | | | | | | | Move CurrentProcessHasOpenDirectories() to the Credentials class and rename it to HasOpenDirectory(). Also add some unittests. BUG=312380 R=jorgelo@chromium.org Review URL: https://codereview.chromium.org/85403011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237242 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: cleanup BrokerProcess class.jln@chromium.org2013-11-233-33/+36
| | | | | | | | | | | A few style guide cleanups and more usage of scopers. BUG=316486 R=rsesek@chromium.org Review URL: https://codereview.chromium.org/84183002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236883 0039d316-1c4b-4281-b951-d872f2087c98
* Add jorgelo as a Linux sandbox OWNERjschuh@chromium.org2013-11-211-0/+1
| | | | | | | | | R=jln@chromium.org TBR=jln@chromium.org Review URL: https://codereview.chromium.org/77733010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236442 0039d316-1c4b-4281-b951-d872f2087c98
* Linux sandbox: fix demo.cc usage of system call numbersjln@chromium.org2013-11-202-6/+18
| | | | | | | | | | | | | | | Include sandbox/linux/services/linux_syscalls.h to make sure that all system calls are defined. Also only build demo.cc for x86 which is the only platform it has been built for. BUG=321363 TBR=markus Review URL: https://codereview.chromium.org/63943007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236123 0039d316-1c4b-4281-b951-d872f2087c98