kernel: Clean code build

This commit is contained in:
ShirkNeko
2025-11-09 23:18:48 +08:00
parent ef36a36e9a
commit fd3a22360a
2 changed files with 1 additions and 23 deletions

View File

@@ -127,7 +127,7 @@ endif
ifeq ($(CONFIG_KSU_MANUAL_HOOK), y) ifeq ($(CONFIG_KSU_MANUAL_HOOK), y)
ccflags-y += -DKSU_MANUAL_HOOK ccflags-y += -DKSU_MANUAL_HOOK
$(info -- SukiSU: KSU_MANUAL_HOOK) $(info -- SukiSU: KSU_MANUAL_HOOK Temporarily discontinued)
else else
ccflags-y += -DKSU_KPROBES_HOOK ccflags-y += -DKSU_KPROBES_HOOK
ccflags-y += -DKSU_TP_HOOK ccflags-y += -DKSU_TP_HOOK

View File

@@ -74,12 +74,6 @@ int ksu_handle_faccessat(int *dfd, const char __user **filename_user, int *mode,
{ {
const char su[] = SU_PATH; const char su[] = SU_PATH;
#ifdef KSU_MANUAL_HOOK
if (!ksu_su_compat_enabled) {
return 0;
}
#endif
if (!ksu_is_allow_uid_for_current(current_uid().val)) { if (!ksu_is_allow_uid_for_current(current_uid().val)) {
return 0; return 0;
} }
@@ -104,11 +98,6 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags)
// const char sh[] = SH_PATH; // const char sh[] = SH_PATH;
const char su[] = SU_PATH; const char su[] = SU_PATH;
#ifdef KSU_MANUAL_HOOK
if (!ksu_su_compat_enabled) {
return 0;
}
#endif
if (!ksu_is_allow_uid_for_current(current_uid().val)) { if (!ksu_is_allow_uid_for_current(current_uid().val)) {
return 0; return 0;
} }
@@ -154,11 +143,6 @@ int ksu_handle_execve_sucompat(const char __user **filename_user,
const char su[] = SU_PATH; const char su[] = SU_PATH;
char path[sizeof(su) + 1]; char path[sizeof(su) + 1];
#ifdef KSU_MANUAL_HOOK
if (!ksu_su_compat_enabled){
return 0;
}
#endif
if (unlikely(!filename_user)) if (unlikely(!filename_user))
return 0; return 0;
@@ -192,12 +176,6 @@ int ksu_handle_execve_sucompat(const char __user **filename_user,
int __ksu_handle_devpts(struct inode *inode) int __ksu_handle_devpts(struct inode *inode)
{ {
#ifdef KSU_MANUAL_HOOK
if (!ksu_su_compat_enabled)
return 0;
#endif
if (!current->mm) { if (!current->mm) {
return 0; return 0;
} }