diff --git a/kernel/sucompat.c b/kernel/sucompat.c index f1a8a11c..d6ba7ff7 100644 --- a/kernel/sucompat.c +++ b/kernel/sucompat.c @@ -130,20 +130,6 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags) char path[sizeof(su) + 1]; memset(path, 0, sizeof(path)); -// Remove this later!! we use syscall hook, so this will never happen!!!!! -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) && 0 - // it becomes a `struct filename *` after 5.18 - // https://elixir.bootlin.com/linux/v5.18/source/fs/stat.c#L216 - const char sh[] = SH_PATH; - struct filename *filename = *((struct filename **)filename_user); - if (IS_ERR(filename)) { - return 0; - } - if (likely(memcmp(filename->name, su, sizeof(su)))) - return 0; - pr_info("vfs_statx su->sh!\n"); - memcpy((void *)filename->name, sh, sizeof(sh)); -#else ksu_strncpy_from_user_nofault(path, *filename_user, sizeof(path)); if (unlikely(!memcmp(path, su, sizeof(su)))) { @@ -153,7 +139,6 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags) pr_info("newfstatat su->sh!\n"); *filename_user = sh_user_path(); } -#endif return 0; }