diff --git a/kernel/throne_tracker.c b/kernel/throne_tracker.c index daec1837..d90e4f8f 100644 --- a/kernel/throne_tracker.c +++ b/kernel/throne_tracker.c @@ -14,13 +14,9 @@ #include "throne_tracker.h" #include "kernel_compat.h" -#include -#include - uid_t ksu_manager_uid = KSU_INVALID_UID; -static struct task_struct *throne_thread; -#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list" +#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list.tmp" struct uid_data { struct list_head list; @@ -324,7 +320,7 @@ static bool is_uid_exist(uid_t uid, char *package, void *data) return exist; } -static void track_throne_function() +void track_throne() { struct file *fp = ksu_filp_open_compat(SYSTEM_PACKAGES_LIST_PATH, O_RDONLY, 0); @@ -419,23 +415,6 @@ out: } } -static int throne_tracker_thread(void *data) -{ - pr_info("%s: pid: %d started\n", __func__, current->pid); - track_throne_function(); - throne_thread = NULL; - pr_info("%s: pid: %d exit!\n", __func__, current->pid); - return 0; -} - -void track_throne() -{ - throne_thread = kthread_run(throne_tracker_thread, NULL, "throne_tracker"); - if (IS_ERR(throne_thread)) { - throne_thread = NULL; - } -} - void ksu_throne_tracker_init() { // nothing to do