summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
|
* HACKING: correct some detailsSam Thursfield2015-05-221-2/+3
|
* Honour environment variables defined in App Container imagesSam Thursfield2015-05-221-3/+7
|
* Add 'cwd' option to run_sandbox() functions.Sam Thursfield2015-05-223-11/+46
| | | | Also, set it correctly when running an App Container image.
* Add linux-user-chroot backend, run-sandbox script, 'appc' loaderSam Thursfield2015-05-227-1/+265
| | | | | This library is now enough to run a very simple App Container image, using either 'chroot' or 'linux-user-chroot'.
* Create a 'sandboxlib' package, rework 'chroot' moduleSam Thursfield2015-05-222-58/+27
| | | | | Removed the App Container-specific stuff from 'chroot' module, and added a copyright notice.
* Add initial sandboxing toolsSam Thursfield2015-05-212-0/+127
sandbox.py lets you create a .aci file (App Container Image) from a tar file, that should run a given command when executed. exec/chroot.py executes a .aci file (App Container Image). I doubt that the produced .aci files are actually compatible with other App Container ('appc') execution tools yet. The executor will also be unable to run all but the simplest applications that are packaged as .aci files. Also, the process of untarring a .tar file to create a .aci, then unpacking the .aci again to run it is very ineffecient. Plus it is missing lots of important features. But, it's a start.