/* Pointer to original chdir function, we must call this
from our intercept function to allow for normal directory
changes. This will also be used to restore the syscall pointer
when this module is unloaded. */
int (*old_sys_chdir)(const char *);
int (*sys_getuid)();
int sys_chdir_intercept(const char *path) {
printk("%d %s\n", sys_getuid(), path);
return old_sys_chdir(path);
}
int init_module() {
// Outputted to your syslog
printk("Module loaded..\n");