X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lxcsu;h=164344f70abfb55f948134a9213c3e3dfbdf315c;hb=91aeace124ac8fab52c98af9c48721c729d85986;hp=83f1144bf752c92bd830b872fb8feb011acd59ea;hpb=7cee96a4f07f95ee9660b954473ecf25f602c6a0;p=lxc-userspace.git diff --git a/lxcsu b/lxcsu index 83f1144..164344f 100755 --- a/lxcsu +++ b/lxcsu @@ -136,10 +136,13 @@ def main (): setns.chcontext('/proc/%s/ns/net'%pid) if (not options.mntns): - open('/proc/lxcsu','w').write(pid) + setns.chcontext('/proc/%s/ns/mnt'%pid) if (not options.pidns): - open('/proc/pidsu','w').write(pid) + setns.chcontext('/proc/%s/ns/pid'%pid) + + if (not os.access('/proc/self',0)): + setns.proc_mount() # cgroups is not yet LXC-safe, so we need to use the course grained access control # strategy of unmounting the filesystem