/third_party/musl/libc-test/src/functionalext/supplement/linux/linux_gtest/ |
H A D | linux_unshare_test.cpp | 13 * @tc.desc: Verify that the unshare function can successfully create a new PID namespace by using the 23 int result = unshare(CLONE_NEWPID); in HWTEST_F() 36 * @tc.desc: Verify the behavior of the unshare() function when an invalid flag is provided as an argument, 42 int result = unshare(NUM); in HWTEST_F()
|
/third_party/rust/crates/rustix/src/thread/ |
H A D | setns.rs | 59 /// `CLONE_*` for use with [`unshare`]. 117 /// `unshare(flags)`—Disassociate parts of the current thread's execution 121 /// - [`unshare`] 123 /// [`unshare`]: https://man7.org/linux/man-pages/man2/unshare.2.html 124 pub fn unshare(flags: UnshareFlags) -> io::Result<()> { in unshare() functions 125 syscalls::unshare(flags) in unshare()
|
/third_party/eudev/test/ |
H A D | test-udev.c | 41 static inline int unshare (int x) { return syscall(SYS_unshare, x); } in unshare() function 64 err = unshare(CLONE_NEWNS); in fake_filesystems() 67 fprintf(stderr, "failed to call unshare(): %m\n"); in fake_filesystems()
|
/third_party/toybox/toys/other/ |
H A D | nsenter.c | 7 * unshare.c - run command in new context 11 * See http://man7.org/linux/man-pages/man1/unshare.1.html 16 USE_UNSHARE(NEWTOY(unshare, "<1^f(fork);r(map-root-user);i:(ipc);m:(mount);n:(net);p:(pid);u:(uts);U:(user);", TOYFLAG_USR|TOYFLAG_BIN)) 19 bool "unshare" 23 usage: unshare [-imnpuUr] COMMAND... 70 #define unshare(flags) syscall(SYS_unshare, flags) macro 78 // Code that must run in unshare's flag context 127 // For -r, we have to save our original [ug]id before calling unshare() in unshare_main() 130 // unshare -U does not imply -r, so we cannot use [+rU] in unshare_main() 136 if (unshare( in unshare_main() [all...] |
/third_party/musl/src/linux/ |
H A D | unshare.c | 5 int unshare(int flags) in unshare() function
|
/third_party/ltp/testcases/kernel/containers/utsname/ |
H A D | utsname04.c | 47 TST_EXP_EQ_LI(unshare(CLONE_NEWUTS), -1); in run() 60 { "m:", &str_op, "Test execution mode <clone|unshare>" },
|
/third_party/ltp/testcases/kernel/syscalls/unshare/ |
H A D | unshare01.c | 10 * Basic tests for the unshare() syscall. 14 * Calls unshare() for different CLONE_* flags in a child process and expects 47 TST_EXP_PASS(unshare(tc[i].mode), "unshare(%s)", tc[i].desc); in run() 59 TST_TEST_TCONF("unshare is undefined.");
|
H A D | unshare02.c | 10 * Basic tests for the unshare(2) errors. 51 TST_EXP_FAIL(unshare(tc[i].mode), tc[i].expected_error, in run() 52 "unshare(%s)", tc[i].desc); in run() 72 TST_TEST_TCONF("unshare is undefined.");
|
/third_party/rust/crates/nix/test/ |
H A D | test_mount.rs | 20 use nix::sched::{unshare, CloneFlags}; 213 unshare(CloneFlags::CLONE_NEWNS | CloneFlags::CLONE_NEWUSER).unwrap_or_else(|e| { in setup_namespaces() 217 "unshare failed: {}. Are unprivileged user namespaces available?", in setup_namespaces()
|
/third_party/rust/crates/nix/src/ |
H A D | sched.rs | 129 /// See also [unshare(2)](https://man7.org/linux/man-pages/man2/unshare.2.html) 130 pub fn unshare(flags: CloneFlags) -> Result<()> { in unshare() functions 131 let res = unsafe { libc::unshare(flags.bits()) }; in unshare()
|
/third_party/rust/crates/rustix/src/backend/libc/thread/ |
H A D | syscalls.rs | 299 pub(crate) fn unshare(flags: crate::thread::UnshareFlags) -> io::Result<()> { 300 unsafe { ret(c::unshare(flags.bits() as i32)) }
|
/third_party/ltp/testcases/kernel/syscalls/getxattr/ |
H A D | getxattr05.c | 93 /* unshare() should support CLONE_NEWUSER flag since Linux 3.8 */ in do_unshare() 94 res = unshare(CLONE_NEWUSER); in do_unshare() 96 tst_brk(TFAIL | TERRNO, "unshare(CLONE_NEWUSER) failed"); in do_unshare() 150 * We need to change the default value to call unshare(). in setup()
|
/third_party/ltp/testcases/kernel/syscalls/pivot_root/ |
H A D | pivot_root01.c | 93 /* Work in child process - needed to undo unshare and chroot */ in run() 100 TEST(unshare(CLONE_NEWNS | CLONE_FS)); in run() 102 tst_brk(TFAIL | TTERRNO, "unshare failed"); in run() 189 TST_TEST_TCONF("unshare is undefined.");
|
/third_party/musl/porting/liteos_a/user/include/ |
H A D | sched.h | 73 int unshare(int);
|
/third_party/musl/porting/liteos_m_iccarm/kernel/include/ |
H A D | sched.h | 65 int unshare(int);
|
/third_party/musl/porting/liteos_m/kernel/include/ |
H A D | sched.h | 65 int unshare(int);
|
/third_party/musl/porting/liteos_a/kernel/include/ |
H A D | sched.h | 67 int unshare(int);
|
/third_party/musl/porting/uniproton/kernel/include/ |
H A D | sched.h | 65 int unshare(int);
|
/third_party/ltp/testcases/kernel/syscalls/fanotify/ |
H A D | fanotify17.c | 151 /* unshare() should support CLONE_NEWUSER flag since Linux 3.8 */ in do_unshare() 152 res = unshare(CLONE_NEWUSER); in do_unshare() 154 tst_brk(TFAIL | TERRNO, "unshare(CLONE_NEWUSER) failed"); in do_unshare() 221 * We need to change the default value to call unshare(). in setup()
|
/third_party/musl/porting/linux/user/include/ |
H A D | sched.h | 79 int unshare(int);
|
/third_party/musl/porting/liteos_m/user/include/ |
H A D | sched.h | 77 int unshare(int);
|
/third_party/musl/include/ |
H A D | sched.h | 90 int unshare(int);
|
/third_party/rust/crates/rustix/src/backend/linux_raw/thread/ |
H A D | syscalls.rs | 294 pub(crate) fn unshare(flags: crate::thread::UnshareFlags) -> io::Result<()> {
|
/third_party/ltp/lib/ |
H A D | tst_safe_macros.c | 443 res = unshare(flags); in safe_unshare() 448 "unshare(%d) unsupported", flags); in safe_unshare() 451 "unshare(%d) failed", flags); in safe_unshare() 455 "Invalid unshare(%d) return value %d", flags, res); in safe_unshare()
|
/third_party/rust/crates/libc/src/unix/linux_like/android/ |
H A D | mod.rs | 3238 pub fn unshare(flags: ::c_int) -> ::c_int; in unshare() functions
|