summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WORK IN PROGRESS: systemd-nspawn backendsam/systemd-nspawnSam Thursfield2015-06-093-10/+324
|
* 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!
* Add 'url' and 'license' metadata to setup.cfgSam Thursfield2015-06-041-0/+2
|
* Bump version numberSam Thursfield2015-06-041-1/+1
|
* Use reStructuredText instead of MarkdownSam Thursfield2015-06-045-229/+252
| | | | | | Github supports either, but the Python Package Index (PyPI) only understands reStructuredText. The Sphinx documentation tool also prefers reStructuredTest so we may as well use it throughout.
* Add release process to HACKING.mdwnSam Thursfield2015-06-041-2/+28
|
* Set version number to 0.1.0Sam Thursfield2015-06-041-1/+1
|
* Fix the test suite0.1.0Sam Thursfield2015-06-042-77/+142
|
* Fix creating missing mountpoints in linux-user-chroot backend, update docsSam Thursfield2015-06-012-7/+21
| | | | | | | | Creating missing mountpoints is done later now, so that there's less chance of them being created if bad sandbox configuration was passed. The previous code didn't seem work correctly, probably because of Python os.path.join() having the annoying behaviour of deleting all previous path components if it finds one with a preceeding '/'.
* Log the actual commandline being runSam Thursfield2015-05-281-0/+9
| | | | | | This makes it easier to debug problems. The log domain 'sandboxlib' is used, so callers can handle the log messages from 'sandboxlib' however they want using the Python 'logging' API.
* Don't have a 'base' environment, make the caller specify 'env'Sam Thursfield2015-05-285-34/+15
| | | | | | | | | The idea with 'extra_env' was that all 'sandboxlib' sandboxes would have a consistent base environment with standard PATH, etc. But that's not really workable at all, and only PATH actually matters here anyway. Now the caller passes in the entire environment as 'env', 'extra_env' is gone.
* Add support for output redirectionSam Thursfield2015-05-283-42/+96
| | | | | | | | | | I had hoped that we could provide access to a subprocess.Popen() instance directly so users could do whatever they want with the .stdout and .stderr pipes. However, that's not always possible (e.g. the chroot backend can't return the Popen object it creates to the caller, because it's in a different process). The current approach isn't groundbreaking but it is quite simple.
* Add sandbox_module_for_platform() methodSam Thursfield2015-05-281-0/+67
| | | | This decides what is the best module to use on the current platform.
* Fix error when mount type is None (used for bind mounts)Sam Thursfield2015-05-271-0/+2
|
* README: Add a bunch of infoSam Thursfield2015-05-271-5/+133
|
* Add 'filesystem_root' and 'filesystem_writable_paths' settingsSam Thursfield2015-05-274-15/+298
| | | | This is the last bit of API needed to be usable by YBD and Morph.
* Mention 'mounts' in documentation of maximum_possible_isolation()Sam Thursfield2015-05-271-0/+2
|
* chroot: Fix mountingSam Thursfield2015-05-271-33/+35
| | | | | | No need to do mounts inside the process that calls os.chroot(), and in fact it's stupid because there's no guarantee of a /bin/umount existing after we call os.chroot().
* Initial work to allow configuring mount sharing and mountingSam Thursfield2015-05-265-17/+236
| | | | This is far from complete and has probably numerous issues right now.
* Add a basic test suite using 'py.test' and 'tox'Sam Thursfield2015-05-263-1/+74
|
* Add simple setup.py using the 'pbr' moduleSam Thursfield2015-05-262-0/+18
|
* Return the exit code, stdout and stderr from run_sandbox()Sam Thursfield2015-05-264-26/+79
| | | | This required a rewrite of the 'chroot' module.
* Let's get some real documentation started.Sam Thursfield2015-05-223-2/+75
|
* Add the ability to isolate the sandbox from the network, or notSam Thursfield2015-05-223-3/+61
| | | | | | | | | | | | | Note that *sharing* the network is a different thing to *choosing not to isolate* the network. The former implies networking will actually work correctly, while the latter only implies that we didn't deliberately break it. So the default network behaviour is 'undefined'. The different backends have different capabilities, so I added a maximum_possible_isolation() method to return whatever is the most isolated configuration that a backend is capable of. I called this function maximum_security() initially, but it doesn't actually guarantee any kind of security at all so that wasn't a good name.
* chroot: Handle failure betterSam Thursfield2015-05-221-4/+12
|
* run-sandbox: Small compliance improvement for App Container imagesSam Thursfield2015-05-221-0/+2
| | | | | | | | Set the AC_APP_NAME environment variable. We fail to set AC_METADATA_URL, and since it's totally out of scope for 'sandboxlib' to provide a metadata sharing service, will continue to do so.
* README: Add note about App Container spec, now I know more about what it isSam Thursfield2015-05-221-0/+11
|
* README: Fix broken links, copy 'license' section from YBD READMESam Thursfield2015-05-221-13/+10
|
* Add an initial READMESam Thursfield2015-05-221-0/+27
|