ksud: probe for more workdir candidates (#12)
- reuses old ksu functions
- makes sure its an empty dir
- adapted from https://github.com/rsuntk/KernelSU/commit/141f010 71cb86c2e9
Co-authored-by: powellnorma <101364699+powellnorma@users.noreply.github.com>
Co-authored-by: Rissu <90097027+rsuntk@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::defs::{KSU_MOUNT_SOURCE, NO_MOUNT_PATH, NO_TMPFS_PATH, TEMP_DIR};
|
||||
use crate::defs::{KSU_MOUNT_SOURCE, NO_MOUNT_PATH, NO_TMPFS_PATH};
|
||||
use crate::module::{handle_updated_modules, prune_modules};
|
||||
use crate::{assets, defs, ksucalls, restorecon, utils};
|
||||
use anyhow::{Context, Result};
|
||||
@@ -69,7 +69,7 @@ pub fn on_post_data_fs() -> Result<()> {
|
||||
|
||||
// mount temp dir
|
||||
if !Path::new(NO_TMPFS_PATH).exists() {
|
||||
if let Err(e) = mount(KSU_MOUNT_SOURCE, TEMP_DIR, "tmpfs", MountFlags::empty(), "") {
|
||||
if let Err(e) = mount(KSU_MOUNT_SOURCE, utils::get_tmp_path(), "tmpfs", MountFlags::empty(), "") {
|
||||
warn!("do temp dir mount failed: {}", e);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user