kernel: nest ksun switch manager support under CONFIG_KSU_SWITCH_MANAGER config default as disabled

This commit is contained in:
Rifat Azad
2025-08-10 12:28:34 +06:00
parent edb99a2c1a
commit e0c461322b
2 changed files with 10 additions and 5 deletions

View File

@@ -40,4 +40,11 @@ config KSU_LSM_SECURITY_HOOKS
Disabling this is mostly only useful for kernel 4.1 and older. Disabling this is mostly only useful for kernel 4.1 and older.
Make sure to implement manual hooks on security/security.c. Make sure to implement manual hooks on security/security.c.
config KSU_SWITCH_MANAGER
bool "KernelSU switch manager support"
depends on KSU
default n
help
Enable KernelSU switch manager support.
endmenu endmenu

View File

@@ -314,7 +314,9 @@ static struct kernel_param_ops expected_size_ops = {
module_param_cb(ksu_debug_manager_uid, &expected_size_ops, module_param_cb(ksu_debug_manager_uid, &expected_size_ops,
&ksu_debug_manager_uid, S_IRUSR | S_IWUSR); &ksu_debug_manager_uid, S_IRUSR | S_IWUSR);
#else #endif
#ifdef CONFIG_KSU_SWITCH_MANAGER
static int set_expected_size(const char *val, const struct kernel_param *kp) static int set_expected_size(const char *val, const struct kernel_param *kp)
{ {
@@ -385,9 +387,5 @@ bool is_manager_apk(char *path)
pr_info("%s: expected size: %u, expected hash: %s\n", pr_info("%s: expected size: %u, expected hash: %s\n",
path, expected_manager_size, expected_manager_hash); path, expected_manager_size, expected_manager_hash);
#ifdef CONFIG_KSU_DEBUG
return check_v2_signature(path, EXPECTED_MANAGER_SIZE, EXPECTED_MANAGER_HASH);
#else
return check_v2_signature(path, expected_manager_size, expected_manager_hash); return check_v2_signature(path, expected_manager_size, expected_manager_hash);
#endif
} }