Skip to content

Commit dadbaa5

Browse files
committed
kernel: ksud: provide dummy handlers for old hooks
prevents breaking old builds.
1 parent 2238b53 commit dadbaa5

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

kernel/core_hook.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,12 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
680680
return 0;
681681
}
682682

683+
int ksu_sb_mount(const char *dev_name, const struct path *path,
684+
const char *type, unsigned long flags, void *data)
685+
{
686+
return 0;
687+
}
688+
683689
#ifndef DEVPTS_SUPER_MAGIC
684690
#define DEVPTS_SUPER_MAGIC 0x1cd1
685691
#endif

kernel/ksud.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,20 @@ bool ksu_is_safe_mode()
415415
return false;
416416
}
417417

418+
__maybe_unused int ksu_handle_execve_ksud(const char __user *filename_user,
419+
const char __user *const __user *__argv)
420+
{
421+
return 0;
422+
}
423+
424+
#if defined(CONFIG_COMPAT)
425+
__maybe_unused int ksu_handle_compat_execve_ksud(const char __user *filename_user,
426+
const compat_uptr_t __user *__argv)
427+
{
428+
return 0;
429+
}
430+
#endif
431+
418432
static void stop_vfs_read_hook()
419433
{
420434
ksu_vfs_read_hook = false;

kernel/sucompat.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr,
152152
return 0;
153153
}
154154

155+
// dummified
156+
int ksu_handle_devpts(struct inode *inode)
157+
{
158+
return 0;
159+
}
160+
155161
int __ksu_handle_devpts(struct inode *inode)
156162
{
157163
barrier();

0 commit comments

Comments
 (0)