kernel: Modified dynamic signature All files have been renamed to the correct names: Dynamic Manager
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
#include "kernel_compat.h"
|
||||
|
||||
#include "kpm/kpm.h"
|
||||
#include "dynamic_sign.h"
|
||||
#include "dynamic_manager.h"
|
||||
|
||||
static bool ksu_module_mounted = false;
|
||||
|
||||
@@ -345,31 +345,31 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Allow the root manager to configure dynamic signatures
|
||||
if (arg2 == CMD_DYNAMIC_SIGN) {
|
||||
// Allow the root manager to configure dynamic manageratures
|
||||
if (arg2 == CMD_DYNAMIC_MANAGER) {
|
||||
if (!from_root && !from_manager) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct dynamic_sign_user_config config;
|
||||
struct dynamic_manager_user_config config;
|
||||
|
||||
if (copy_from_user(&config, (void __user *)arg3, sizeof(config))) {
|
||||
pr_err("copy dynamic sign config failed\n");
|
||||
pr_err("copy dynamic manager config failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ret = ksu_handle_dynamic_sign(&config);
|
||||
int ret = ksu_handle_dynamic_manager(&config);
|
||||
|
||||
if (ret == 0 && config.operation == DYNAMIC_SIGN_OP_GET) {
|
||||
if (ret == 0 && config.operation == DYNAMIC_MANAGER_OP_GET) {
|
||||
if (copy_to_user((void __user *)arg3, &config, sizeof(config))) {
|
||||
pr_err("copy dynamic sign config back failed\n");
|
||||
pr_err("copy dynamic manager config back failed\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
|
||||
pr_err("dynamic_sign: prctl reply error\n");
|
||||
pr_err("dynamic_manager: prctl reply error\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -408,7 +408,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
pr_info("post-fs-data triggered\n");
|
||||
on_post_fs_data();
|
||||
// Initializing Dynamic Signatures
|
||||
ksu_dynamic_sign_init();
|
||||
ksu_dynamic_manager_init();
|
||||
pr_info("Dynamic sign config loaded during post-fs-data\n");
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user