summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a minor bug with root loggerleeming/root-logger-fixAndrew Leeming2016-08-233-3/+3
| | | | If the root logger is used instead of a named 'sandboxlib' logger. This causes potential issues for 3rd party tools using this library
* Merge pull request #20 from gtristan/ensure-loaded-moduleSam Thursfield2016-06-131-0/+9
|\ | | | | Issue 19 and 17: Awful hack to ensure string-escape is loaded
| * Issue 19 and 17: Awful hack to ensure string-escape is loadedTristan Van Berkom2016-06-131-0/+9
|/ | | | | | | This hack ensures that when propagating an exception back from the child process in a chroot, the required string-escape python module is already in memory and no attempt to lazy load it in the chroot is made.
* Merge pull request #18 from gtristan/chroot-exception-propagationSam Thursfield2016-06-111-6/+6
|\ | | | | Propagate child process traceback from chroot process.
| * Propagate child process traceback from chroot process.Tristan Van Berkom2016-06-111-6/+6
|/ | | | | | | Without propagating the traceback for the child, issues such as the following become near impossible to diagnose: https://github.com/devcurmudgeon/ybd/issues/224
* README: fix reStructuredTest0.3.2Sam Thursfield2016-04-011-1/+1
|
* README: link to Awesome Linux Containers, move 'further reading' sectionSam Thursfield2016-04-011-8/+10
|
* README: Add userchroot toolSam Thursfield2016-04-011-0/+7
|
* README: Link to more thingsSam Thursfield2016-02-201-0/+22
|
* README: Discuss Garden linux backendSam Thursfield2016-01-261-0/+4
|
* README: Add a link to GardenSam Thursfield2016-01-261-0/+10
|
* Update README to link to FirejailSam Thursfield2016-01-201-0/+2
| | | | | It looks like a pretty useful sandboxing tool, with more momentum than linux-user-chroot.
* Merge pull request #14 from fishface60/mount-more-flexibilitySam Thursfield2015-11-252-3/+22
|\ | | | | Mount more flexibility
| * sandboxlib.chroot: Don't attempt to unmount remount mountsRichard Maw2015-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | The mount operation is overloaded to also remount to change flags. This does not result in a new mount, so unmounting it is the wrong thing to do in this case. For now, we assume that we're modifying a mount we created earlier, so we can just avoid unmounting when we remount, rather than having to determine how to reverse the changing of flags.
| * sandboxlib.linux_user_chroot: Allow manually specified read-only mountsRichard Maw2015-11-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | You can't create a bind-mount as read-only, you can only bind-mount then remount it as read-only. So a sandboxlib user might opt to say it wants to bind something in, then make it read-only, as two separate extra mounts. We can't do this directly with linux-user-chroot, as we are restricted to bind-mounts and making a subtree read-only, but making a subtree read-only is close enough.
| * sandboxlib.chroot: Make mount commands nicerRichard Maw2015-11-211-2/+12
|/ | | | | | It's more natural to not pass -t when bind-mounting, to not pass -o when no options are required, and to not pass the source path when remounting.
* Fix another typo in HACKING.rstSam Thursfield2015-09-141-1/+1
|
* Fix formatting mistakes in HACKING.rstSam Thursfield2015-09-141-1/+3
|
* Add PySpaces to READMESam Thursfield2015-07-211-0/+8
|
* README: Fix nonsense, add linksSam Thursfield2015-07-031-2/+5
|
* README: Add notes on runC and Warden container runtimesSam Thursfield2015-07-031-0/+25
|
* chroot: Capture output of mount/unmount commands0.3.1Sam Thursfield2015-06-171-2/+4
| | | | | This fixes a crash if the command fails, because we would try to decode 'err' but it would be None because output was not being captured.
* Validate extra_mounts a bit more thoroughlySam Thursfield2015-06-171-10/+17
| | | | | | I thought that a typeerror was causing a crash in YBD, but realised it was something else. This commit should still be an improvement, though.
* chroot: Change directory to '/' after calling os.chroot()Sam Thursfield2015-06-171-0/+3
| | | | | | | This fixes https://github.com/CodethinkLabs/sandboxlib/issues/6 where passing a relative path for 'cwd' caused an error. I had assumed that os.chroot() reset the current working directory itself, since the `chroot` program does, but apparently not.
* Allow overriding backend autodetection with SANDBOXLIB_BACKEND variableSam Thursfield2015-06-172-18/+42
| | | | This fixes https://github.com/CodethinkLabs/sandboxlib/issues/3
* linux_user_chroot: Sort --mount-readonly directoriesSam Thursfield2015-06-101-1/+3
| | | | | This should have no effect on behaviour, but makes things slightly more predictable.
* linux_user_chroot: Correct docstringSam Thursfield2015-06-091-5/+1
| | | | The `unshare` and `mount` commands are no longer needed.
* Fix mistake in CAPABILITIES dictsSam Thursfield2015-06-092-2/+2
|
* README: Fix up the markupSam Thursfield2015-06-091-4/+4
|
* Update READMESam Thursfield2015-06-091-6/+68
|
* Fix numbering in HACKING.rstSam Thursfield2015-06-091-2/+2
|
* Merge branch '0.3.0'0.3.0Sam Thursfield2015-06-095-64/+100
|\
| * Fix some mistakes in chroot backendSam Thursfield2015-06-091-4/+5
| |
| * Add some more tests0.3.0Sam Thursfield2015-06-091-1/+33
| |
| * Validate parameters using CAPABILITIES dict, instead of manuallySam Thursfield2015-06-092-12/+11
| |
| * Note that chroot backend has been tested on OSX now.Sam Thursfield2015-06-091-7/+2
| | | | | | | | | | Also, remove a comment that I think is superfluous. Hopefully it's still clear that the chroot backend should work on any POSIX OS.
| * Fix executor_for_backend()Sam Thursfield2015-06-091-1/+1
| | | | | | | | | | It would always pick 'chroot' even when linux-user-chroot was available because I'm dumb.
| * Rename sandbox_backend_for_platform() to executor_for_platform()Sam Thursfield2015-06-091-1/+1
| | | | | | | | | | | | The old name might be mistaken for a verb, i.e. "sandbox this backend" or some such thing. Hopefully the new name makes it clearer that it returns an execution backend.
| * Replace maximum_possible_isolation() with degrade_config_for_capabilities()Sam Thursfield2015-06-093-42/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to be useful for apps which want to be flexible about which backend they use, taking into account that not all backends are capable of the same thing. My idea for degrade_config_for_capabilities() is that the app first defines the sandboxing config they would like to use, and then passes it through degrade_config_for_capabilities(). Any changes made are warned about, because probably the user needs to know if certain security features are being disabled. This commit also adds a CAPABILITIES dict to each backend.
* | tests: Show compiler output if building the test C program fails.sam/tweaks-from-osxSam Thursfield2015-06-091-2/+8
| |
* | Note that you can't really use the test suite on Mac OS XSam Thursfield2015-06-091-0/+4
|/
* Commit programs.py under correct nameSam Thursfield2015-06-081-20/+61
| | | | This means the test suite actually works now.
* Fix previous commitSam Thursfield2015-06-081-1/+1
|
* Change how we search for 'linux-user-chroot'Sam Thursfield2015-06-083-24/+61
| | | | | | | | | | | | | First, the user should get better errors now if it is not found: sandboxlib.ProgramNotFound: Did not find 'linux-user-chroot' in PATH. Searched '/sbin:/bin:/usr/sbin:/usr/bin' Second, we explicitly search for the program on each call to run_sandbox() using the same search code used in sandbox_module_for_platform(). This shouldn't change anything, but I think it's better practice to search for the program ourselves than to assume exec('linux-user-chroot') will do the right thing.
* Fix calculating mount point targets.Sam Thursfield2015-06-081-1/+1
|
* Do mounts directly in linux-user-chrootSam Thursfield2015-06-082-75/+102
| | | | | | | | | | | This means the linux_user_chroot backend doesn't depend on 'unshare' and 'mount' any more. This in turn means it can be used by non-root users, in theory. This limits what type of mounts the linux_user_chroot backend can do to 'proc', 'tmpfs' and bind mounts. Adding more types without going back to needing 'root' for this backend will require changing linux-user-chroot itself (or creating a separate setuid helper program).
* linux-user-chroot: Allow None for filesystem_writable_pathsSam Thursfield2015-06-051-1/+1
| | | | Previously only 'none' (as a string) was allowed.
* HACKING: Fix a linkSam Thursfield2015-06-051-1/+1
|
* Use PBR 'postversioning', and update release processSam Thursfield2015-06-042-4/+7
| | | | | Rather than specifying the version number in setup.cfg, PBR will work it out from the latest Git tag, which saves a lot of faff. PBR is excellent!
* Use the PBR (OpenStack) versioning schemeSam Thursfield2015-06-041-3/+5
| | | | | It looks like it adapts the scheme from http://www.semver.org/ in line with pre-existing Python conventions, which is exactly what I wanted!