#endif /* Version < v5.7 */
-static unsigned long **sys_call_table;
+static unsigned long **sys_call_table_stolen;
/* UID we want to spy on - will be filled from the command line. */
static uid_t uid = -1;
static int __init syscall_steal_start(void)
{
- if (!(sys_call_table = acquire_sys_call_table()))
+ if (!(sys_call_table_stolen = acquire_sys_call_table()))
return -1;
disable_write_protection();
/* keep track of the original open function */
- original_call = (void *)sys_call_table[__NR_openat];
+ original_call = (void *)sys_call_table_stolen[__NR_openat];
/* use our openat function instead */
- sys_call_table[__NR_openat] = (unsigned long *)our_sys_openat;
+ sys_call_table_stolen[__NR_openat] = (unsigned long *)our_sys_openat;
enable_write_protection();
static void __exit syscall_steal_end(void)
{
- if (!sys_call_table)
+ if (!sys_call_table_stolen)
return;
/* Return the system call back to normal */
- if (sys_call_table[__NR_openat] != (unsigned long *)our_sys_openat) {
+ if (sys_call_table_stolen[__NR_openat] != (unsigned long *)our_sys_openat) {
pr_alert("Somebody else also played with the ");
pr_alert("open system call\n");
pr_alert("The system may be left in ");
}
disable_write_protection();
- sys_call_table[__NR_openat] = (unsigned long *)original_call;
+ sys_call_table_stolen[__NR_openat] = (unsigned long *)original_call;
enable_write_protection();
msleep(2000);