kernel: Prune allowlist only after boot completed
For unknown reason, packages.list is not reliable during boot for oplus devices, so we have to disable pruning and re-run pruning after boot.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
#include "klog.h" // IWYU pragma: keep
|
||||
#include "ksud.h"
|
||||
#include "selinux/selinux.h"
|
||||
#include "allowlist.h"
|
||||
#include "manager.h"
|
||||
@@ -489,6 +490,11 @@ void ksu_prune_allowlist(bool (*is_uid_valid)(uid_t, char *, void *),
|
||||
struct perm_data *np = NULL;
|
||||
struct perm_data *n = NULL;
|
||||
|
||||
if (!ksu_boot_completed) {
|
||||
pr_info("boot not completed, skip prune\n");
|
||||
return;
|
||||
}
|
||||
|
||||
bool modified = false;
|
||||
// TODO: use RCU!
|
||||
mutex_lock(&allowlist_mutex);
|
||||
|
||||
Reference in New Issue
Block a user