Deprecated ADD_TRY_UMOUNT in favor of official kernel_umount; Synced with the latest commit of official KernelSU main repo

- Since official KSU has exposed kernel_umount API and provided meta module for handling mount operations, susfs can finally handover try_umount and auto add_try_umount to KSU and its meta module

- Synced with upstream, see e1e58ed737

Co-authored-by: simonpunk <simonpunk2016@gmail.com>
This commit is contained in:
ShirkNeko
2025-11-23 23:21:26 +08:00
parent 659a6a7e00
commit 85bb10341a
7 changed files with 17 additions and 47 deletions

View File

@@ -68,9 +68,6 @@ extern void susfs_run_sus_path_loop(uid_t uid);
extern bool susfs_is_umount_for_zygote_iso_service_enabled;
extern void susfs_reorder_mnt_id(void);
#endif // #ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
extern void susfs_try_umount(uid_t uid);
#endif
#endif // #ifdef CONFIG_KSU_SUSFS
static bool ksu_enhanced_security_enabled = false;
@@ -297,19 +294,9 @@ int ksu_handle_setresuid(uid_t ruid, uid_t euid, uid_t suid){
return 0;
do_umount:
#ifndef CONFIG_KSU_SUSFS_TRY_UMOUNT
if (!ksu_kernel_umount_enabled || !ksu_module_mounted) {
goto skip_ksu_handle_umount;
}
// Handle kernel umount
ksu_handle_umount(old_uid, new_uid);
skip_ksu_handle_umount:
#else
susfs_try_umount(new_uid);
#endif // #ifndef CONFIG_KSU_SUSFS_TRY_UMOUNT
get_task_struct(current);
#ifdef CONFIG_KSU_SUSFS_SUS_MOUNT