Home
last modified time | relevance | path

Searched refs:unshare (Results 1 - 25 of 28) sorted by relevance

12

/third_party/musl/libc-test/src/functionalext/supplement/linux/linux_gtest/
H A Dlinux_unshare_test.cpp13 * @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 Dsetns.rs59 /// `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 Dtest-udev.c41 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 Dnsenter.c7 * 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 Dunshare.c5 int unshare(int flags) in unshare() function
/third_party/ltp/testcases/kernel/containers/utsname/
H A Dutsname04.c47 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 Dunshare01.c10 * 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 Dunshare02.c10 * 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 Dtest_mount.rs20 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 Dsched.rs129 /// 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 Dsyscalls.rs299 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 Dgetxattr05.c93 /* 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 Dpivot_root01.c93 /* 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 Dsched.h73 int unshare(int);
/third_party/musl/porting/liteos_m_iccarm/kernel/include/
H A Dsched.h65 int unshare(int);
/third_party/musl/porting/liteos_m/kernel/include/
H A Dsched.h65 int unshare(int);
/third_party/musl/porting/liteos_a/kernel/include/
H A Dsched.h67 int unshare(int);
/third_party/musl/porting/uniproton/kernel/include/
H A Dsched.h65 int unshare(int);
/third_party/ltp/testcases/kernel/syscalls/fanotify/
H A Dfanotify17.c151 /* 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 Dsched.h79 int unshare(int);
/third_party/musl/porting/liteos_m/user/include/
H A Dsched.h77 int unshare(int);
/third_party/musl/include/
H A Dsched.h90 int unshare(int);
/third_party/rust/crates/rustix/src/backend/linux_raw/thread/
H A Dsyscalls.rs294 pub(crate) fn unshare(flags: crate::thread::UnshareFlags) -> io::Result<()> {
/third_party/ltp/lib/
H A Dtst_safe_macros.c443 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 Dmod.rs3238 pub fn unshare(flags: ::c_int) -> ::c_int; in unshare() functions

Completed in 20 milliseconds

12