fix build
This commit is contained in:
@@ -66,7 +66,7 @@ static void setup_groups(struct root_profile *profile, struct cred *cred)
|
||||
put_group_info(group_info);
|
||||
}
|
||||
|
||||
static void disable_seccomp()
|
||||
void disable_seccomp(void)
|
||||
{
|
||||
assert_spin_locked(¤t->sighand->siglock);
|
||||
// disable seccomp
|
||||
|
||||
@@ -65,4 +65,6 @@ void escape_with_root_profile(void);
|
||||
|
||||
void escape_to_root_for_cmd_su(uid_t target_uid, pid_t target_pid);
|
||||
|
||||
void disable_seccomp(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "supercalls.h"
|
||||
#include "syscall_hook_manager.h"
|
||||
#include "kernel_umount.h"
|
||||
#include "app_profile.h"
|
||||
|
||||
#include "sulog.h"
|
||||
|
||||
@@ -194,13 +195,6 @@ int ksu_handle_setresuid(uid_t ruid, uid_t euid, uid_t suid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ksu_task_prctl(int option, unsigned long arg2, unsigned long arg3,
|
||||
unsigned long arg4, unsigned long arg5)
|
||||
{
|
||||
ksu_handle_prctl(option, arg2, arg3, arg4, arg5);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
// kernel 4.4 and 4.9
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || \
|
||||
defined(CONFIG_IS_HW_HISI) || \
|
||||
@@ -223,7 +217,6 @@ static int ksu_key_permission(key_ref_t key_ref, const struct cred *cred,
|
||||
|
||||
#ifndef MODULE
|
||||
static struct security_hook_list ksu_hooks[] = {
|
||||
LSM_HOOK_INIT(task_prctl, ksu_task_prctl),
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || \
|
||||
defined(CONFIG_IS_HW_HISI) || defined(CONFIG_KSU_ALLOWLIST_WORKAROUND)
|
||||
LSM_HOOK_INIT(key_permission, ksu_key_permission)
|
||||
|
||||
@@ -399,7 +399,7 @@ void ksu_syscall_hook_manager_init(void)
|
||||
#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
|
||||
ret = register_trace_sys_enter(ksu_sys_enter_handler, NULL);
|
||||
#ifndef CONFIG_KRETPROBES
|
||||
unmark_all_process();
|
||||
ksu_unmark_all_process();
|
||||
ksu_mark_running_process();
|
||||
#endif
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user