kernel: Resolved permission verification issue

This commit is contained in:
ShirkNeko
2025-11-05 19:04:51 +08:00
parent 89ce65e8ba
commit f8904b1b02

View File

@@ -25,12 +25,7 @@ static bool always_allow(uid_t uid)
static bool system_uid(uid_t uid) static bool system_uid(uid_t uid)
{ {
if (!current->mm || current->in_execve) { return uid <= 2000;
return 0;
}
uid_t caller_uid = current_uid().val;
return caller_uid <= 2000;
} }
#ifdef CONFIG_KSU_MANUAL_SU #ifdef CONFIG_KSU_MANUAL_SU