#include <linux/slab.h>
#include <linux/export.h>
#include <linux/nsproxy.h>
#include <linux/init_task.h>
#include <linux/mnt_namespace.h>
#include <linux/utsname.h>
#include <linux/pid_namespace.h>
#include <net/net_namespace.h>
#include <linux/ipc_namespace.h>
#include <linux/time_namespace.h>
#include <linux/fs_struct.h>
#include <linux/proc_fs.h>
#include <linux/proc_ns.h>
#include <linux/file.h>
#include <linux/syscalls.h>
#include <linux/cgroup.h>
#include <linux/perf_event.h>
static struct kmem_cache *nsproxy_cachep;
struct nsproxy init_nsproxy = …;
static inline struct nsproxy *create_nsproxy(void)
{ … }
static struct nsproxy *create_new_namespaces(unsigned long flags,
struct task_struct *tsk, struct user_namespace *user_ns,
struct fs_struct *new_fs)
{ … }
int copy_namespaces(unsigned long flags, struct task_struct *tsk)
{ … }
void free_nsproxy(struct nsproxy *ns)
{ … }
int unshare_nsproxy_namespaces(unsigned long unshare_flags,
struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs)
{ … }
void switch_task_namespaces(struct task_struct *p, struct nsproxy *new)
{ … }
void exit_task_namespaces(struct task_struct *p)
{ … }
int exec_task_namespaces(void)
{ … }
static int check_setns_flags(unsigned long flags)
{ … }
static void put_nsset(struct nsset *nsset)
{ … }
static int prepare_nsset(unsigned flags, struct nsset *nsset)
{ … }
static inline int validate_ns(struct nsset *nsset, struct ns_common *ns)
{ … }
static int validate_nsset(struct nsset *nsset, struct pid *pid)
{ … }
static void commit_nsset(struct nsset *nsset)
{ … }
SYSCALL_DEFINE2(setns, int, fd, int, flags)
{ … }
int __init nsproxy_cache_init(void)
{ … }