[skip ci] minor fixup (#72)

1. update README_CN.md
2. indent fixup
This commit is contained in:
Ylarod
2023-01-15 17:05:08 +08:00
committed by GitHub
parent bff4303dbb
commit a30aab1da6
5 changed files with 32 additions and 29 deletions

View File

@@ -128,7 +128,7 @@ static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
}
if (first_app_process &&
!memcmp(filename->name, app_process, sizeof(app_process) - 1)) {
!memcmp(filename->name, app_process, sizeof(app_process) - 1)) {
first_app_process = false;
pr_info("exec app_process, /data prepared!\n");
ksu_load_allow_list();
@@ -148,7 +148,7 @@ static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
return 0;
}
static const char KERNEL_SU_RC[] =
static const char KERNEL_SU_RC[] =
"\n"
"on post-fs-data\n"
@@ -253,10 +253,10 @@ static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) && LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
.symbol_name = "__do_execve_file",
.symbol_name = "__do_execve_file",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0)
.symbol_name = "do_execveat_common",
#endif
.symbol_name = "do_execveat_common",
#endif
.pre_handler = execve_handler_pre,
};