Home
last modified time | relevance | path

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

12

/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dchroot.c27 int result = chroot("/data"); in chroot_0100()
39 int result = chroot("/sub"); in chroot_0200()
/third_party/musl/src/linux/
H A Dchroot.c5 int chroot(const char *path) in chroot() function
/third_party/toybox/toys/other/
H A Dchroot.c0 /* chroot.c - Run command in new root directory.
5 * TODO: The test for root is "==" so root can trivially escape a chroot by
6 * moving it below cwd, ala mkdir("sub"); chroot("sub"); chdir("../../../..")
10 USE_CHROOT(NEWTOY(chroot, "^<1", TOYFLAG_USR|TOYFLAG_SBIN|TOYFLAG_ARGFAIL(125)))
13 bool "chroot"
16 usage: chroot NEWROOT [COMMAND [ARG...]]
27 if (chdir(*toys.optargs) || chroot(".")) { in chroot_main()
H A Dswitch_root.c13 Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,
72 // point we are in the chroot, so a relative path is still OK. in switch_root_main()
89 // Fix the appearance of the mount table in the newroot chroot in switch_root_main()
96 if (chroot(".")) { in switch_root_main()
97 perror_msg("chroot"); in switch_root_main()
101 // Make sure cwd does not point outside of the chroot in switch_root_main()
/third_party/ltp/testcases/kernel/syscalls/chroot/
H A Dchroot04.c12 * Testcase to check that chroot sets errno to EACCES.
14 * As a non-root user attempt to perform chroot() to a directory that the user
15 * does not have a search permission for. The chroot() call should fail with
27 TST_EXP_FAIL(chroot(TEST_TMPDIR), EACCES, "no search permission chroot()"); in verify_chroot()
H A Dchroot02.c12 * Basic chroot() functionality test.
30 TST_EXP_PASS(chroot(path), "chroot(%s)", path); in verify_chroot()
H A Dchroot01.c9 * Testcase to check the whether chroot sets errno to EPERM.
11 * As a non-root user attempt to perform chroot() to a directory. The
12 * chroot() call should fail with EPERM
23 TST_EXP_FAIL(chroot(path), EPERM, "unprivileged chroot()"); in verify_chroot()
H A Dchroot03.c11 * Testcase to test whether chroot(2) sets errno correctly.
13 * - to test whether chroot() is setting ENAMETOOLONG if the
15 * - to test whether chroot() is setting ENOTDIR if the argument
17 * - to test whether chroot() is setting ENOENT if the directory
19 * - attempt to chroot to a path pointing to an invalid address
21 * - to test whether chroot() is setting ELOOP if the two
43 {&longname_dir, ENAMETOOLONG, "chroot(longer than VFS_MAXNAMELEN)"},
44 {&file_name, ENOTDIR, "chroot(not a directory)"},
45 {&nonexistent_dir, ENOENT, "chroot(does not exists)"},
46 {&bad_ptr, EFAULT, "chroot(a
[all...]
/third_party/toybox/scripts/
H A Druntest.sh185 # Set up a chroot environment and run commands within it.
198 echo -n "Setup chroot"
210 chroot tmpdir4chroot /test.sh
/third_party/mesa3d/.gitlab-ci/container/
H A Dlava_build.sh218 chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh
/third_party/musl/porting/liteos_a/user/include/
H A Dunistd.h186 int chroot(const char *);
/third_party/musl/porting/uniproton/kernel/include/
H A Dunistd.h161 int chroot(const char *);
/third_party/musl/porting/linux/user/include/
H A Dunistd.h188 int chroot(const char *);
/third_party/musl/porting/liteos_m/user/include/
H A Dunistd.h186 int chroot(const char *);
/third_party/musl/porting/liteos_m_iccarm/kernel/include/
H A Dunistd.h161 int chroot(const char *);
/third_party/musl/porting/liteos_a/kernel/include/
H A Dunistd.h166 int chroot(const char *);
/third_party/musl/porting/liteos_m/kernel/include/
H A Dunistd.h161 int chroot(const char *);
/third_party/musl/include/
H A Dunistd.h225 int chroot(const char *);
/third_party/ltp/testcases/kernel/security/tomoyo/
H A Dtomoyo_filesystem_test.c514 /* Test chroot(). */ in main()
516 set_profile(3, "file::chroot"); in main()
520 show_prompt("chroot('/tmp/mount/') for '/tmp/mount/'", 0); in main()
523 if (chroot("/tmp/mount/") == 0) in main()
533 show_prompt("chroot('/tmp/mount/') for '/tmp/mount/'", 1); in main()
536 if (chroot("/tmp/mount/") == EOF && errno == EPERM) in main()
547 show_prompt("chroot('/tmp/mount/') for " in main()
551 if (chroot("/tmp/mount/") == 0) in main()
562 set_profile(0, "file::chroot"); in main()
/third_party/ltp/lib/
H A Dtst_safe_macros.c426 rval = chroot(path); in safe_chroot()
429 tst_brk_(file, lineno, TBROK | TERRNO, "chroot(%s) failed", in safe_chroot()
433 "Invalid chroot(%s) return value %d", path, rval); in safe_chroot()
/third_party/libwebsockets/lib/plat/unix/
H A Dunix-spawn.c509 if (i->chroot_path && chroot(i->chroot_path)) { in lws_spawn_piped()
510 lwsl_err("%s: child chroot %s failed, errno %d\n", in lws_spawn_piped()
/third_party/toybox/lib/
H A Dxwrap.c658 if (chroot(path)) error_exit("chroot '%s'", path); in xchroot()
/third_party/rust/crates/nix/src/
H A Dunistd.rs1335 pub fn chroot<P: ?Sized + NixPath>(path: &P) -> Result<()> { in chroot() functions
1337 unsafe { libc::chroot(cstr.as_ptr()) } in chroot()
/third_party/rust/crates/libc/src/unix/
H A Dmod.rs1287 pub fn chroot(name: *const ::c_char) -> ::c_int; in chroot() functions
/third_party/toybox/generated/
H A Dflags.h276 // chroot ^<1 ^<1
3707 #define TT this.chroot

Completed in 52 milliseconds

12