From d35c303ef05e24d306fb4c05aa042b9f94a2bd4a Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Thu, 17 Jun 2021 18:40:37 +0200 Subject: [PATCH] Implement chroot as always returning EPERM. --- src/header/unistd/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index 449128ab..22a68767 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -88,9 +88,14 @@ pub unsafe extern "C" fn chdir(path: *const c_char) -> c_int { Sys::chdir(path) } -// #[no_mangle] +#[no_mangle] pub extern "C" fn chroot(path: *const c_char) -> c_int { - unimplemented!(); + // TODO: Implement + unsafe { + platform::errno = crate::header::errno::EPERM; + } + + -1 } #[no_mangle] -- GitLab