aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: leverage PR_SET_NO_NEW_PRIVS when availablev2.27Mike Frysinger2021-10-231-0/+3
| | | | | | | | This will lock down the ability to use set*id programs (like sudo), and will allow us to utilize seccomp bpf to speed up ptrace. Closes: https://bugs.gentoo.org/442172 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: add xattr wrappers #672566Mike Frysinger2021-10-221-0/+3
| | | | | | | These modify the filesystem, so don't let them do their business. Fixes: https://bugs.gentoo.org/672566 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: enable support for linux namespacesv2.9Mike Frysinger2015-09-271-0/+12
| | | | | | | | This initial version doesn't enable their use by default. URL: https://bugs.gentoo.org/512794 Reported-by: Matthew Thode <prometheanfire@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: add proper option parsingMike Frysinger2015-09-201-0/+3
| | | | | | This lays the groundwork for adding more runtime options. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsbutil: gnulib: import modules for canonicalize_filename_modeMike Frysinger2015-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | This lays the groundwork for fixing handling of broken symlinks. The gnulib code is hand imported because using the gnulib tool imports a ton of code we do not want. Only the bare minimum is imported so we can use the canonicalize_filename_mode function. This function is needed to canonicalize symlinks that are ultimately broken. The current sandbox/C library code only supports two modes: (1) dereference a single symlink (2) dereference *all* symlinks, but only if all links are valid For sandbox, we need to know the final path a symlink points to even if that path doesn't (yet) exist. Note: This commit doesn't actually fix the bug, just brings in the functions we need to do so. URL: https://bugs.gentoo.org/540828 Reported-by: Rick Farina <zerochaos@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: use process_vm_readv if availableMike Frysinger2012-08-121-0/+3
| | | | | | | Should speed up loading of strings from remote processes as we only have to do (usually) one syscall to extract the whole string in one shot. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* include stdint.h/inttypes.h tooMike Frysinger2012-07-031-0/+6
| | | | | | These contain useful defines which we sometimes want to leverage. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* clean up configure script a bit and log active envMike Frysinger2009-04-131-2/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: add support for tracing Blackfin/PARISC systemsMike Frysinger2009-04-081-0/+13
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: initial support for tracing of static binaries via ptrace()Mike Frysinger2009-03-181-0/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: add symlink tests and unify codeMike Frysinger2009-03-081-0/+6
| | | | | | | Add test cases for symlink behavior and unify some of the test code to make adding more test cases even easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: lock main syscall code with a mutexMike Frysinger2009-02-181-0/+3
| | | | | | | | | Since the main sandbox code maintains state with global variables (like sbcontext), make sure we use a pthread mutex to prevent multiple threads from corrupting each other. In the non-threaded case this shouldn't be a problem as the C library provides redirection stubs in its own code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* pull in siginfo.h when availableMike Frysinger2009-02-051-0/+3
| | | | | | Some systems define psignal() in siginfo.h, so use it when available. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: initial test frameworkMike Frysinger2008-11-111-0/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* check for backtrace and stdbool.h/elf.h/execinfo.hMike Frysinger2008-11-101-0/+9
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* headers.h: consolidate all random system includes into one fileMike Frysinger2008-11-091-0/+87
Signed-off-by: Mike Frysinger <vapier@gentoo.org>