diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-02-26 11:15:42 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-02-28 11:39:54 +0000 |
commit | 4474a163f78c8e1ea6cee9e594b5b8f7679ddb3f (patch) | |
tree | a7de4b0d203c6cdbf93a52870dcde33918f56164 /morphlib/plugins | |
parent | 4440e2ec57bc82ab767b2bca55d6d8d4bfaf897f (diff) | |
download | morph-4474a163f78c8e1ea6cee9e594b5b8f7679ddb3f.tar.gz |
Add the ability for chunk morphs to specify devices
Within a linux-user-chroot, we do not want to allow arbitrary code to
create device nodes, but still want it to be possible to create a device
node. This commit creates and handles the 'devices' field in a chunk
morphology, which takes:
* filename. A string, e.g. "/dev/null"
* uid. The ID of the user the file belongs to, e.g. 0 for root.
* gid. The ID of the group the file belongs to, e.g. 0 for root.
* type. A string of either 'c' for a character device or 'b' for a block
device.
* major. The device's major number.
* minor. The device's minor number.
* permissions. A string of the octal number that would be passed to chmod
e.g. '0777'
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index f9595f98..cbc41acf 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -348,6 +348,7 @@ class BranchAndMergePlugin(cliapp.Plugin): 'install-commands', 'max-jobs', 'chunks', + 'devices', ] } |