| /linux-6.15/kernel/ |
| H A D | nsproxy.c | 157 if (likely(!(flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | in copy_namespaces() 219 if (!(unshare_flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | in unshare_nsproxy_namespaces() 278 if (!flags || (flags & ~(CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC | in check_setns_flags() 325 if (nsset->fs && (flags & CLONE_NEWNS) && (flags & ~CLONE_NEWNS)) in put_nsset() 347 if (flags == CLONE_NEWNS) { in prepare_nsset() 349 } else if (flags & CLONE_NEWNS) { in prepare_nsset() 439 if (flags & CLONE_NEWNS) { in validate_nsset() 526 if ((flags & CLONE_NEWNS) && (flags & ~CLONE_NEWNS)) { in commit_nsset()
|
| /linux-6.15/tools/testing/selftests/pid_namespace/ |
| H A D | pid_max.c | 205 pid = do_clone(pid_max_nested_inner, NULL, CLONE_NEWPID | CLONE_NEWNS); in pid_max_nested_outer() 316 pid = do_clone(pid_max_nested_limit_inner, NULL, CLONE_NEWPID | CLONE_NEWNS); in pid_max_nested_limit_outer() 335 pid = do_clone(pid_max_cb, NULL, CLONE_NEWPID | CLONE_NEWNS); in TEST() 344 pid = do_clone(pid_max_nested_limit_outer, NULL, CLONE_NEWPID | CLONE_NEWNS); in TEST() 353 pid = do_clone(pid_max_nested_outer, NULL, CLONE_NEWPID | CLONE_NEWNS); in TEST()
|
| /linux-6.15/tools/testing/selftests/mount/ |
| H A D | unprivileged-remount-test.c | 19 #ifndef CLONE_NEWNS 20 # define CLONE_NEWNS 0x00020000 macro 211 if (unshare(CLONE_NEWNS) != 0) { in test_unpriv_remount() 225 if (unshare(CLONE_NEWNS) != 0) { in test_unpriv_remount() 291 ret = unshare(CLONE_NEWNS); in test_priv_mount_unpriv_remount()
|
| H A D | nosymfollow-test.c | 111 if (unshare(CLONE_NEWNS) != 0) in create_and_enter_ns()
|
| /linux-6.15/tools/testing/selftests/move_mount_set_group/ |
| H A D | move_mount_set_group_test.c | 20 #ifndef CLONE_NEWNS 21 #define CLONE_NEWNS 0x00020000 macro 115 if (unshare(CLONE_NEWNS)) in prepare_unpriv_mountns() 371 ASSERT_EQ(setns(ca_to.mntnsfd, CLONE_NEWNS), 0); in TEST_F()
|
| /linux-6.15/tools/testing/selftests/filesystems/nsfs/ |
| H A D | iterate_mntns.c | 54 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in FIXTURE_SETUP() 117 ASSERT_EQ(setns(self->fd_mnt_ns[0], CLONE_NEWNS), 0); in TEST_F() 136 ASSERT_EQ(setns(self->fd_mnt_ns[MNT_NS_LAST_INDEX], CLONE_NEWNS), 0); in TEST_F()
|
| /linux-6.15/tools/testing/selftests/filesystems/overlayfs/ |
| H A D | set_layers_via_fds.c | 54 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 171 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 238 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 383 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 457 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 534 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 603 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F()
|
| H A D | dev_in_maps.c | 144 if (unshare(CLONE_NEWNS) == -1) { in main()
|
| /linux-6.15/fs/ |
| H A D | nsfs.c | 217 if (ns->ops->type != CLONE_NEWNS) in ns_ioctl() 279 if (ns->ops->type != CLONE_NEWNS) in ns_ioctl() 300 if (ns->ops->type != CLONE_NEWNS) in ns_ioctl()
|
| /linux-6.15/tools/testing/selftests/exec/ |
| H A D | recursion-depth.c | 35 if (unshare(CLONE_NEWNS) == -1) { in main()
|
| /linux-6.15/tools/testing/selftests/tmpfs/ |
| H A D | bug-link-o-tmpfile.c | 42 if (unshare(CLONE_NEWNS) == -1) { in main()
|
| /linux-6.15/tools/perf/trace/beauty/include/uapi/linux/ |
| H A D | sched.h | 20 #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ macro
|
| /linux-6.15/include/uapi/linux/ |
| H A D | sched.h | 20 #define CLONE_NEWNS 0x00020000 /* New mount namespace group */ macro
|
| /linux-6.15/samples/binderfs/ |
| H A D | binderfs_example.c | 23 ret = unshare(CLONE_NEWNS); in main()
|
| /linux-6.15/tools/testing/selftests/proc/ |
| H A D | proc-subset-pid.c | 42 if (unshare(CLONE_NEWNS) == -1) { in make_private_proc()
|
| /linux-6.15/tools/testing/selftests/mount_setattr/ |
| H A D | mount_setattr_test.c | 26 #ifndef CLONE_NEWNS 27 #define CLONE_NEWNS 0x00020000 macro 248 if (unshare(CLONE_NEWNS)) in prepare_unpriv_mountns() 1015 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 1029 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in FIXTURE_SETUP() 1309 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 1370 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 1642 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F() 2096 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in TEST_F()
|
| /linux-6.15/tools/perf/util/ |
| H A D | namespaces.c | 311 if (setns(newns, CLONE_NEWNS) < 0) in nsinfo__mountns_enter() 332 setns(nc->oldns, CLONE_NEWNS); in nsinfo__mountns_exit()
|
| /linux-6.15/tools/testing/selftests/capabilities/ |
| H A D | test_execve.c | 91 if (outer_uid == 0 && unshare(CLONE_NEWNS) == 0) { in create_and_enter_ns() 112 } else if (unshare(CLONE_NEWUSER | CLONE_NEWNS) == 0) { in create_and_enter_ns()
|
| /linux-6.15/tools/testing/selftests/firmware/ |
| H A D | fw_namespace.c | 97 if (unshare(CLONE_NEWNS) != 0) { in test_fw_in_ns()
|
| /linux-6.15/tools/testing/selftests/bpf/prog_tests/ |
| H A D | connect_ping.c | 101 if (!ASSERT_OK(unshare(CLONE_NEWNET | CLONE_NEWNS), "unshare")) in test_connect_ping()
|
| H A D | test_bpffs.c | 39 err = unshare(CLONE_NEWNS); in fn()
|
| /linux-6.15/tools/testing/selftests/pidfd/ |
| H A D | pidfd_setns_test.c | 43 …[PIDFD_NS_MNT] = { "mnt", CLONE_NEWNS, PIDFD_GET_MNT_NAMESPACE, … 172 if (self->nsfds[PIDFD_NS_MNT] >= 0 && unshare(CLONE_NEWNS) < 0) { in FIXTURE_SETUP() 226 if (self->nsfds[PIDFD_NS_MNT] >= 0 && unshare(CLONE_NEWNS) < 0) { in FIXTURE_SETUP()
|
| H A D | pidfd_bind_mount.c | 107 ASSERT_EQ(unshare(CLONE_NEWNS), 0); in FIXTURE_SETUP()
|
| /linux-6.15/Documentation/userspace-api/ |
| H A D | unshare.rst | 157 CLONE_NEWNS 158 If CLONE_NEWNS is set, the namespace of the caller is 169 EPERM CLONE_NEWNS was specified by a non-root process (process 266 CLONE_NEWNS is set, force CLONE_FS.
|
| /linux-6.15/tools/testing/selftests/filesystems/ |
| H A D | devpts_pts.c | 290 ret = unshare(CLONE_NEWNS); in main()
|