kernel: Greenlight the new prctl command

This commit is contained in:
ShirkNeko
2025-10-26 20:43:51 +08:00
parent f7fe0cf748
commit 324dc0844f
3 changed files with 2 additions and 19 deletions

View File

@@ -134,22 +134,6 @@ else
$(info -- KPM is disabled)
endif
ifeq ($(CONFIG_KSU_MANUAL_SU), y)
KSU_PW_POOL := abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
KSU_PW_LEN := $(shell awk 'BEGIN{srand(); print int(rand()*9)+8}')
ifeq ($(CONFIG_KSU), m)
KSU_SU_PASSWORD := CilloZako114514
else
KSU_SU_PASSWORD := $(shell \
tr -dc '$(KSU_PW_POOL)' </dev/urandom | head -c $(KSU_PW_LEN))
endif
ccflags-y += -DKSU_SU_PASSWORD=\"$(KSU_SU_PASSWORD)\"
$(info -- KSU manual-su password : $(KSU_SU_PASSWORD))
endif
ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat
ccflags-y += -Wno-declaration-after-statement -Wno-unused-function

View File

@@ -477,8 +477,7 @@ if (likely(ksu_is_current_proc_umounted())) { // prevent side channel attack in
}
#ifdef CONFIG_KSU_MANUAL_SU
is_manual_su_cmd = (arg2 == CMD_SU_ESCALATION_REQUEST ||
arg2 == CMD_ADD_PENDING_ROOT);
is_manual_su_cmd = (arg2 == CMD_SU_ESCALATION_REQUEST || arg2 == CMD_ADD_PENDING_ROOT || arg2 == CMD_GENERATE_AUTH_TOKEN );
#endif
// skip this private space support if uid below 100k

View File

@@ -7,7 +7,7 @@
#define KSU_SU_VERIFIED_BIT (1UL << 0)
#define KSU_TOKEN_LENGTH 32
#define KSU_TOKEN_ENV_NAME "KSU_AUTH_TOKEN"
#define KSU_TOKEN_EXPIRE_TIME 30
#define KSU_TOKEN_EXPIRE_TIME 60
struct ksu_token_entry {
char token[KSU_TOKEN_LENGTH + 1];