| /linux/tools/testing/selftests/namespaces/ |
| H A D | cred_change_test.c | 40 .ns_type = CLONE_NEWUSER, in TEST() 71 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 177 .ns_type = CLONE_NEWUSER, in TEST() 208 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 293 .ns_type = CLONE_NEWUSER, in TEST() 324 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 412 .ns_type = CLONE_NEWUSER, in TEST() 442 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 470 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 582 .ns_type = CLONE_NEWUSER, in TEST() [all …]
|
| H A D | stress_test.c | 41 .ns_type = CLONE_NEWUSER, in TEST() 97 .ns_type = CLONE_NEWUSER, in TEST() 282 .ns_type = CLONE_NEWUSER, in TEST() 316 if (setns(userns_fd, CLONE_NEWUSER) < 0) { in TEST() 350 .ns_type = CLONE_NEWUSER, in TEST() 568 .ns_type = CLONE_NEWUSER | CLONE_NEWNET | CLONE_NEWUTS, in TEST()
|
| H A D | regression_pidfd_setns_test.c | 52 if (unshare(CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWNET | CLONE_NEWUSER) < 0) { in TEST() 95 child_pid = create_child(&pidfd, CLONE_NEWUSER | CLONE_NEWUTS | CLONE_NEWIPC | CLONE_NEWNET); in TEST()
|
| H A D | file_handle_test.c | 472 ret = unshare(CLONE_NEWUSER); in TEST() 601 ret = unshare(CLONE_NEWUSER); in TEST() 730 ret = unshare(CLONE_NEWUSER); in TEST() 859 ret = unshare(CLONE_NEWUSER); in TEST() 991 ret = unshare(CLONE_NEWUSER); in TEST() 1120 ret = unshare(CLONE_NEWUSER); in TEST() 1269 ret = unshare(CLONE_NEWUSER); in TEST()
|
| H A D | listns_pagination_bug.c | 30 .ns_type = CLONE_NEWUSER, /* Filter by user namespace */ in TEST()
|
| /linux/tools/testing/selftests/uevent/ |
| H A D | uevent_filtering.c | 128 if (post_flags & CLONE_NEWUSER) { in uevent_listener() 129 ret = unshare(CLONE_NEWUSER); in uevent_listener() 275 if (pre_flags & CLONE_NEWUSER) { in do_test() 276 ret = unshare(CLONE_NEWUSER); in do_test() 418 ret = do_test(CLONE_NEWUSER, 0, true, sync_fd); in TEST() 432 ret = do_test(CLONE_NEWUSER | CLONE_NEWNET, 0, false, sync_fd); in TEST() 462 ret = do_test(0, CLONE_NEWUSER, true, sync_fd); in TEST() 478 ret = do_test(0, CLONE_NEWUSER | CLONE_NEWNET, true, sync_fd); in TEST()
|
| /linux/kernel/ |
| H A D | nsproxy.c | 296 CLONE_NEWNET | CLONE_NEWTIME | CLONE_NEWUSER | in check_setns_flags() 301 if (flags & CLONE_NEWUSER) in check_setns_flags() 336 if (flags & CLONE_NEWUSER) in put_nsset() 356 if (flags & CLONE_NEWUSER) in prepare_nsset() 437 if (flags & CLONE_NEWUSER) in validate_nsset() 449 if (flags & CLONE_NEWUSER) { in validate_nsset() 535 if (flags & CLONE_NEWUSER) { in commit_nsset()
|
| H A D | nstree.c | 220 VFS_WARN_ON_ONCE(owner->ns_type != CLONE_NEWUSER); in __ns_tree_add_raw() 299 case CLONE_NEWUSER: in ns_tree_from_type() 470 VFS_WARN_ON_ONCE(owner->ns_type != CLONE_NEWUSER); in lookup_ns_owner_at() 564 ns = lookup_ns_id(kls->user_ns_id, CLONE_NEWUSER); in do_listns_userns()
|
| /linux/tools/testing/selftests/pidfd/ |
| H A D | pidfd_setns_test.c | 42 …[PIDFD_NS_USER] = { "user", CLONE_NEWUSER, PIDFD_GET_USER_NAMESPACE, … 141 if (self->nsfds[PIDFD_NS_USER] >= 0 && unshare(CLONE_NEWUSER) < 0) in FIXTURE_SETUP() 160 self->child_pid1 = create_child(&self->child_pidfd1, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 164 self->child_pid1 = create_child(&self->child_pidfd1, CLONE_NEWUSER); in FIXTURE_SETUP() 214 self->child_pid2 = create_child(&self->child_pidfd2, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 218 self->child_pid2 = create_child(&self->child_pidfd2, CLONE_NEWUSER); in FIXTURE_SETUP() 408 ASSERT_NE(setns(self->pidfd, CLONE_NEWUSER | CLONE_VM), 0); in TEST_F() 418 ASSERT_NE(setns(self->child_pidfd_exited, CLONE_NEWUSER | CLONE_NEWNET), in TEST_F()
|
| H A D | pidfd_file_handle_test.c | 53 self->child_pid1 = create_child(&self->child_pidfd1, CLONE_NEWUSER); in FIXTURE_SETUP() 75 self->child_pid2 = create_child(&self->child_pidfd2, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 97 self->child_pid3 = create_child(&self->child_pidfd3, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP() 251 ASSERT_EQ(setns(self->child_pidfd2, CLONE_NEWUSER | CLONE_NEWPID), 0); in TEST_F()
|
| H A D | pidfd_fdinfo_test.c | 99 if (!(flags & CLONE_NEWUSER) && geteuid() != 0) in clone_newns() 100 flags |= CLONE_NEWUSER; in clone_newns()
|
| H A D | pidfd_setattr_test.c | 35 self->child_pid = create_child(&self->child_pidfd, CLONE_NEWUSER | CLONE_NEWPID); in FIXTURE_SETUP()
|
| /linux/tools/testing/selftests/filesystems/nsfs/ |
| H A D | owner.c | 42 if (unshare(CLONE_NEWUTS | CLONE_NEWUSER)) in main() 81 if (unshare(CLONE_NEWUSER)) in main()
|
| H A D | pidns.c | 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); in main()
|
| /linux/tools/testing/selftests/move_mount_set_group/ |
| H A D | move_mount_set_group_test.c | 24 #ifndef CLONE_NEWUSER 25 #define CLONE_NEWUSER 0x10000000 macro 85 if (unshare(CLONE_NEWUSER)) in create_and_enter_userns()
|
| /linux/tools/testing/selftests/mount/ |
| H A D | unprivileged-remount-test.c | 31 #ifndef CLONE_NEWUSER 32 # define CLONE_NEWUSER 0x10000000 macro 162 if (unshare(CLONE_NEWUSER) !=0) { in create_and_enter_userns()
|
| /linux/tools/testing/selftests/filesystems/ |
| H A D | utils.c | 288 pid = do_clone(get_userns_fd_cb, NULL, CLONE_NEWUSER | CLONE_NEWNS); in get_userns_fd_from_idmap() 398 pid = do_clone(userns_fd_cb, h, CLONE_NEWUSER | CLONE_FILES | CLONE_VM); in create_userns_hierarchy() 490 ret = unshare(CLONE_NEWNS|CLONE_NEWUSER); in setup_userns() 525 ret = unshare(CLONE_NEWUSER); in enter_userns()
|
| H A D | utils.h | 35 if (setns(fd, CLONE_NEWUSER)) in switch_userns()
|
| /linux/tools/testing/selftests/safesetid/ |
| H A D | safesetid-test.c | 28 #ifndef CLONE_NEWUSER 29 # define CLONE_NEWUSER 0x10000000 macro 242 int clone_flags = CLONE_NEWUSER; in test_userns()
|
| /linux/tools/testing/selftests/pid_namespace/ |
| H A D | regression_enomem.c | 27 EXPECT_EQ(0, unshare(CLONE_NEWUSER)); in TEST()
|
| /linux/tools/perf/trace/beauty/include/uapi/linux/ |
| H A D | sched.h | 31 #define CLONE_NEWUSER 0x10000000 /* New user namespace */ macro
|
| /linux/include/uapi/linux/ |
| H A D | sched.h | 31 #define CLONE_NEWUSER 0x10000000 /* New user namespace */ macro
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | deny_namespace.c | 41 if (unshare(CLONE_NEWUSER)) in create_user_ns()
|
| /linux/include/linux/ |
| H A D | nsproxy.h | 63 if (set->flags & CLONE_NEWUSER) in nsset_cred()
|
| /linux/fs/ |
| H A D | nsfs.c | 242 if (ns->ns_type != CLONE_NEWUSER) in ns_ioctl() 505 case CLONE_NEWUSER: in is_current_namespace() 615 case CLONE_NEWUSER: in nsfs_fh_to_dentry()
|