summaryrefslogtreecommitdiff
path: root/morphlib/morph2.py
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-02-26 11:15:42 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-02-28 11:39:54 +0000
commit4474a163f78c8e1ea6cee9e594b5b8f7679ddb3f (patch)
treea7de4b0d203c6cdbf93a52870dcde33918f56164 /morphlib/morph2.py
parent4440e2ec57bc82ab767b2bca55d6d8d4bfaf897f (diff)
downloadmorph-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/morph2.py')
-rw-r--r--morphlib/morph2.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/morphlib/morph2.py b/morphlib/morph2.py
index a95312c6..ee58ecdc 100644
--- a/morphlib/morph2.py
+++ b/morphlib/morph2.py
@@ -36,6 +36,7 @@ class Morphology(object):
('build-commands', None),
('test-commands', None),
('install-commands', None),
+ ('devices', None),
('chunks', []),
('max-jobs', None),
('build-system', 'manual')