summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-10-29 18:13:52 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-10-30 15:12:17 +0000
commit64861f8dba8bd038c3ddfeb48dbef140a4332c6a (patch)
tree5d8a233ce4ed52160f5fd30440aada11ec0d4223
parent203f34b2b19b1d3dc51a956ae9329d064ea294dd (diff)
downloadmorph-64861f8dba8bd038c3ddfeb48dbef140a4332c6a.tar.gz
Make deployment extensions use unshared_cmdline
-rw-r--r--morphlib/extensions.py5
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)