kernel: Greenlight the new prctl command
This commit is contained in:
@@ -134,22 +134,6 @@ else
|
|||||||
$(info -- KPM is disabled)
|
$(info -- KPM is disabled)
|
||||||
endif
|
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-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat
|
||||||
ccflags-y += -Wno-declaration-after-statement -Wno-unused-function
|
ccflags-y += -Wno-declaration-after-statement -Wno-unused-function
|
||||||
|
|
||||||
|
|||||||
@@ -477,8 +477,7 @@ if (likely(ksu_is_current_proc_umounted())) { // prevent side channel attack in
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_KSU_MANUAL_SU
|
#ifdef CONFIG_KSU_MANUAL_SU
|
||||||
is_manual_su_cmd = (arg2 == CMD_SU_ESCALATION_REQUEST ||
|
is_manual_su_cmd = (arg2 == CMD_SU_ESCALATION_REQUEST || arg2 == CMD_ADD_PENDING_ROOT || arg2 == CMD_GENERATE_AUTH_TOKEN );
|
||||||
arg2 == CMD_ADD_PENDING_ROOT);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// skip this private space support if uid below 100k
|
// skip this private space support if uid below 100k
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#define KSU_SU_VERIFIED_BIT (1UL << 0)
|
#define KSU_SU_VERIFIED_BIT (1UL << 0)
|
||||||
#define KSU_TOKEN_LENGTH 32
|
#define KSU_TOKEN_LENGTH 32
|
||||||
#define KSU_TOKEN_ENV_NAME "KSU_AUTH_TOKEN"
|
#define KSU_TOKEN_ENV_NAME "KSU_AUTH_TOKEN"
|
||||||
#define KSU_TOKEN_EXPIRE_TIME 30
|
#define KSU_TOKEN_EXPIRE_TIME 60
|
||||||
|
|
||||||
struct ksu_token_entry {
|
struct ksu_token_entry {
|
||||||
char token[KSU_TOKEN_LENGTH + 1];
|
char token[KSU_TOKEN_LENGTH + 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user