Bug fixes
authorSapan Bhatia <gwsapan@gmail.com>
Mon, 3 Jun 2013 19:49:40 +0000 (15:49 -0400)
committerSapan Bhatia <gwsapan@gmail.com>
Mon, 3 Jun 2013 19:49:40 +0000 (15:49 -0400)
lxcsu
setns.c

diff --git a/lxcsu b/lxcsu
index 2f1c0af..164344f 100755 (executable)
--- a/lxcsu
+++ b/lxcsu
@@ -141,7 +141,7 @@ def main ():
     if (not options.pidns):
         setns.chcontext('/proc/%s/ns/pid'%pid)
 
-    if (!os.access('/proc/self'):
+    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
diff --git a/setns.c b/setns.c
index fded30b..c40d52b 100644 (file)
--- a/setns.c
+++ b/setns.c
@@ -33,7 +33,7 @@ static PyObject *
 proc_mount(PyObject *self, PyObject *args)
 {
     int sts; 
-    sts = mount("none","/proc","procfs",0,NULL);
+    sts = mount("none","/proc","proc",0,NULL);
 
     return Py_BuildValue("i", sts);
 }