git://git.onelab.eu
/
lxc-userspace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
indent=4
[lxc-userspace.git]
/
setns.c
diff --git
a/setns.c
b/setns.c
index
7d82d53
..
e82bd26
100644
(file)
--- a/
setns.c
+++ b/
setns.c
@@
-1,7
+1,7
@@
#include <Python.h>
#include <fcntl.h>
#include <stdio.h>
#include <Python.h>
#include <fcntl.h>
#include <stdio.h>
-#include <asm
-generic
/unistd.h>
+#include <asm/unistd.h>
#include <sys/mount.h>
static PyObject *
#include <sys/mount.h>
static PyObject *
@@
-15,12
+15,11
@@
chfscontext(PyObject *self, PyObject *args)
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
- //printf("Could not open ns file\n");
sts = -1;
goto out;
}
sts = -1;
goto out;
}
- if (setns(fd,
666
)) {
+ if (setns(fd,
0
)) {
sts = -1;
}
close(fd);
sts = -1;
}
close(fd);
@@
-59,7
+58,6
@@
chcontext(PyObject *self, PyObject *args)
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
int fd = open(filepath, O_RDONLY);
if (fd < 0) {
-// printf("Could not open ns file\n");
sts = -1;
goto out;
}
sts = -1;
goto out;
}