diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 435bb3163f5a..4f417ba2e0dd 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -535,7 +535,6 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old) try_umount("/data/adb/modules", false, MNT_DETACH); // try umount ksu temp path - try_umount("/debug_ramdisk", false, MNT_DETACH); try_umount("/sbin", false, MNT_DETACH); return 0; diff --git a/userspace/ksud/src/defs.rs b/userspace/ksud/src/defs.rs index c4b9fc3f989b..660a4c16dd5e 100644 --- a/userspace/ksud/src/defs.rs +++ b/userspace/ksud/src/defs.rs @@ -28,7 +28,6 @@ pub const MODULE_UPDATE_TMP_DIR: &str = concatcp!(ADB_DIR, "modules_update/"); pub const SYSTEM_RW_DIR: &str = concatcp!(MODULE_DIR, ".rw/"); -pub const TEMP_DIR: &str = "/debug_ramdisk"; pub const TEMP_DIR_LEGACY: &str = "/sbin"; pub const MODULE_WEB_DIR: &str = "webroot"; diff --git a/userspace/ksud/src/mount.rs b/userspace/ksud/src/mount.rs index 11be898bbeb7..402c09461fd4 100644 --- a/userspace/ksud/src/mount.rs +++ b/userspace/ksud/src/mount.rs @@ -155,33 +155,7 @@ pub fn mount_overlayfs( } #[cfg(any(target_os = "linux", target_os = "android"))] -pub fn mount_tmpfs(dest: impl AsRef) -> Result<()> { - info!("mount tmpfs on {}", dest.as_ref().display()); - if let Result::Ok(fs) = fsopen("tmpfs", FsOpenFlags::FSOPEN_CLOEXEC) { - let fs = fs.as_fd(); - fsconfig_set_string(fs, "source", KSU_OVERLAY_SOURCE)?; - fsconfig_create(fs)?; - let mount = fsmount(fs, FsMountFlags::FSMOUNT_CLOEXEC, MountAttrFlags::empty())?; - move_mount( - mount.as_fd(), - "", - CWD, - dest.as_ref(), - MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH, - )?; - } else { - mount( - KSU_OVERLAY_SOURCE, - dest.as_ref(), - "tmpfs", - MountFlags::empty(), - "", - )?; - } - Ok(()) -} -#[cfg(any(target_os = "linux", target_os = "android"))] pub fn bind_mount(from: impl AsRef, to: impl AsRef) -> Result<()> { info!( "bind mount {} -> {}", @@ -320,8 +294,3 @@ pub fn mount_overlay( ) -> Result<()> { unimplemented!() } - -#[cfg(not(any(target_os = "linux", target_os = "android")))] -pub fn mount_tmpfs(_dest: impl AsRef) -> Result<()> { - unimplemented!() -}