X-Git-Url: http://git.onelab.eu/?p=lxc-userspace.git;a=blobdiff_plain;f=lxcsu-internal;h=a670d6292d6e2f66b37af5001b06b220a3d3af16;hp=894b08e20eceb192d307fda67592a7001af8cd8d;hb=e31c61c5ffecd28042d95979fb32f49bf96ad2fb;hpb=e618652140a133d6b77eec00bbbf55986896c5ea diff --git a/lxcsu-internal b/lxcsu-internal index 894b08e..a670d62 100755 --- a/lxcsu-internal +++ b/lxcsu-internal @@ -152,9 +152,13 @@ def main (): if (not args.pidns): setns.chcontext('/proc/%s/ns/pid'%pid) + proc_mounted = False if (not os.access('/proc/self',0)): + proc_mounted = True setns.proc_mount() + + # cgroups is not yet LXC-safe, so we need to use the course grained access control # strategy of unmounting the filesystem @@ -185,6 +189,7 @@ def main (): if debug: print 'lxcsu-internal:execv:','/usr/bin/setarch',exec_args os.execv('/usr/bin/setarch',exec_args) else: + setns.proc_umount() _,status = os.waitpid(pid,0) exit(os.WEXITSTATUS(status))