diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-10-29 18:13:52 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-10-30 15:12:17 +0000 |
commit | 64861f8dba8bd038c3ddfeb48dbef140a4332c6a (patch) | |
tree | 5d8a233ce4ed52160f5fd30440aada11ec0d4223 | |
parent | 203f34b2b19b1d3dc51a956ae9329d064ea294dd (diff) | |
download | morph-64861f8dba8bd038c3ddfeb48dbef140a4332c6a.tar.gz |
Make deployment extensions use unshared_cmdline
-rw-r--r-- | morphlib/extensions.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/morphlib/extensions.py b/morphlib/extensions.py index 6b81e116..b270d304 100644 --- a/morphlib/extensions.py +++ b/morphlib/extensions.py @@ -223,10 +223,7 @@ class ExtensionSubprocess(object): def close_read_end(): os.close(log_read_fd) p = subprocess.Popen( - # We unshare and mount --make-rprivate so mounts done by write - # extensions can't interfere with the rest of the system. - ['unshare', '-m', '--', '/bin/sh', '-c', - 'mount --make-rprivate / && exec "$@"', '-', filename] + args, + morphlib.util.unshared_cmdline([filename] + list(args)), cwd=cwd, env=new_env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, preexec_fn=close_read_end) |