kernel: add CMD_GET_SUSFS_FEATURE_STATUS command to get the correct functional state of SUSFS

This commit is contained in:
ShirkNeko
2025-06-16 19:36:37 +08:00
parent 20fa0a4a62
commit bce28cc3ca
2 changed files with 136 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#define CMD_ENABLE_SU 15
#define CMD_ENABLE_KPM 100
#define CMD_HOOK_TYPE 101
#define CMD_GET_SUSFS_FEATURE_STATUS 102
#define EVENT_POST_FS_DATA 1
#define EVENT_BOOT_COMPLETED 2
@@ -36,6 +37,25 @@
#define KSU_MAX_GROUPS 32
#define KSU_SELINUX_DOMAIN 64
// SUSFS Functional State Structures
struct susfs_feature_status {
bool status_sus_path;
bool status_sus_mount;
bool status_auto_default_mount;
bool status_auto_bind_mount;
bool status_sus_kstat;
bool status_try_umount;
bool status_auto_try_umount_bind;
bool status_spoof_uname;
bool status_enable_log;
bool status_hide_symbols;
bool status_spoof_cmdline;
bool status_open_redirect;
bool status_magic_mount;
bool status_overlayfs_auto_kstat;
bool status_sus_su;
};
struct root_profile {
int32_t uid;
int32_t gid;