diff --git a/kernel/allowlist.c b/kernel/allowlist.c index 30eb1c10..b84a0037 100644 --- a/kernel/allowlist.c +++ b/kernel/allowlist.c @@ -138,6 +138,7 @@ bool ksu_set_app_profile(struct app_profile *profile, bool persist) list_add_tail(&p->list, &allow_list); result = true; +exit: // check if the default profiles is changed, cache it to a single struct to accelerate access. if (unlikely(!strcmp(profile->key, "$"))) { // set default non root profile @@ -150,7 +151,7 @@ bool ksu_set_app_profile(struct app_profile *profile, bool persist) memcpy(&default_root_profile, &profile->rp_config.profile, sizeof(default_root_profile)); } -exit: + if (persist) persistent_allow_list();