setns.chcontext('/proc/%s/ns/uts'%pid)
setns.chcontext('/proc/%s/ns/ipc'%pid)
+
+ if (not args.pidns):
+ setns.chcontext('/proc/%s/ns/pid'%pid)
if (not args.netns):
setns.chcontext('/proc/%s/ns/net'%pid)
if (not args.mntns):
setns.chcontext('/proc/%s/ns/mnt'%pid)
- if (not args.pidns):
- setns.chcontext('/proc/%s/ns/pid'%pid)
+
proc_mounted = False
if (not os.access('/proc/self',0)):
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
- //printf("Could not open ns file\n");
sts = -1;
goto out;
}
- if (setns(fd, 666)) {
+ if (setns(fd, 0)) {
sts = -1;
}
close(fd);
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
-// printf("Could not open ns file\n");
sts = -1;
goto out;
}