kernel: Add CONFIG_KSU_MANUAL_SU configuration

- Use random passphrase protection for manual su functionality
This commit is contained in:
ShirkNeko
2025-09-29 06:50:39 +08:00
parent a9a10466b3
commit 78e0dc6da2
7 changed files with 54 additions and 6 deletions

View File

@@ -525,6 +525,7 @@ void ksu_allowlist_exit(void)
mutex_unlock(&allowlist_mutex);
}
#ifdef CONFIG_KSU_MANUAL_SU
bool ksu_temp_grant_root_once(uid_t uid)
{
struct app_profile profile = {
@@ -600,3 +601,4 @@ void ksu_temp_revoke_root_once(uid_t uid)
persistent_allow_list();
pr_info("pending_root: UID=%d removed and persist updated\n", uid);
}
#endif