From 430a3504d49468165bb3f7a9480c44e172783d50 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:08:43 +0800 Subject: [PATCH] Fix line breaks in code and clean up unnecessary includes --- kernel/apk_sign.c | 2 +- kernel/arch.h | 2 +- kernel/core_hook.c | 1 + kernel/ksud.c | 2 +- kernel/ksud.h | 1 + kernel/selinux/rules.c | 2 +- kernel/sucompat.c | 6 ++---- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/apk_sign.c b/kernel/apk_sign.c index 699a73ed..f62b9411 100644 --- a/kernel/apk_sign.c +++ b/kernel/apk_sign.c @@ -354,4 +354,4 @@ bool is_manager_apk(char *path, char *package) { } return check_v2_signature(path); -} \ No newline at end of file +} diff --git a/kernel/arch.h b/kernel/arch.h index 5207678b..326d303f 100644 --- a/kernel/arch.h +++ b/kernel/arch.h @@ -99,4 +99,4 @@ #define PT_REAL_REGS(regs) ((regs)) #endif -#endif +#endif \ No newline at end of file diff --git a/kernel/core_hook.c b/kernel/core_hook.c index f3f37276..216c5428 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -117,6 +117,7 @@ static void setup_groups(struct root_profile *profile, struct cred *cred) groups_sort(group_info); set_groups(cred, group_info); + put_group_info(group_info); } static void disable_seccomp(void) diff --git a/kernel/ksud.c b/kernel/ksud.c index e62a6675..e54a0dec 100644 --- a/kernel/ksud.c +++ b/kernel/ksud.c @@ -730,4 +730,4 @@ void ksu_ksud_exit() is_boot_phase = false; #endif -} \ No newline at end of file +} diff --git a/kernel/ksud.h b/kernel/ksud.h index 21fe3cc8..cc2df243 100644 --- a/kernel/ksud.h +++ b/kernel/ksud.h @@ -10,4 +10,5 @@ void on_post_fs_data(void); bool ksu_is_safe_mode(void); extern u32 ksu_devpts_sid; + #endif diff --git a/kernel/selinux/rules.c b/kernel/selinux/rules.c index 529a670c..9f0de2a7 100644 --- a/kernel/selinux/rules.c +++ b/kernel/selinux/rules.c @@ -524,4 +524,4 @@ exit: reset_avc_cache(); return ret; -} \ No newline at end of file +} diff --git a/kernel/sucompat.c b/kernel/sucompat.c index 854e1576..e894c064 100644 --- a/kernel/sucompat.c +++ b/kernel/sucompat.c @@ -8,15 +8,13 @@ #include #include #include +#include #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) #include #else #include #endif -/* current_user_stack_pointer */ -#include - #include "objsec.h" #include "allowlist.h" #include "arch.h" @@ -166,7 +164,7 @@ int ksu_handle_execve_sucompat(int *fd, const char __user **filename_user, * some cpus dont really have that good speculative execution * access_ok to substitute set_fs, we check if pointer is accessible */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0) if (!access_ok(VERIFY_READ, *filename_user, sizeof(path))) return 0; #else