Searched refs:setns (Results 1 - 8 of 8) sorted by relevance

/lxc/hooks/
H A Dunmount-namespace.c28 #define _GNU_SOURCE /* setns */
33 #include <sched.h> /* setns */
52 /* Define setns() if missing from the C library */
54 static inline int setns(int fd, int nstype) function
207 if (setns(ctmntfd, CLONE_NEWNS) != 0) {
/lxc/src/lxc/
H A Dutils.h61 /* Define setns() if missing from the C library */
63 static inline int setns(int fd, int nstype) function
H A Dlxc_user_nic.c784 ret = setns(fd, CLONE_NEWNET);
788 usernic_error("Failed to setns() to the network namespace of "
847 // COMMENT(brauner): setns() should fail if setresuid() doesn't
852 ret = setns(ofd, CLONE_NEWNET);
854 usernic_error("Failed to setns() to original network namespace "
H A Dattach.c279 if (setns(fd[i], 0) < 0) {
824 * longer be threaded (we can't properly setns() in a threaded
826 * 2. We can't setns() in the child itself, since we want to make
830 * setns() (otherwise, user namespaces will hate us).
857 /* Open /proc before setns() to the containers namespace so we
H A Dstart.c167 if (setns(ns_fd[i], 0) != 0)
H A Dutils.c1149 ret = setns(fd, 0);
H A Dconf.c2554 if (setns(netnsfd, 0) != 0) {
2572 if (setns(oldfd, 0) != 0)
/lxc/src/tests/
H A Dlxc-test-utils.c218 if (setns(init_ns, 0) < 0) {

Completed in 37 milliseconds