Here is my function in my kernel module which I insert using insmod command after make at later stages. I am working on goldfish (2.6.29)
asmlinkage long our_sys_read(unsigned int fd, char *buf, size_t count) { printk("------->> our_sys_read getuid() ---------- %d\n", getuid()); return original_call_read(fd,buf,count); } I want to trap system calls and find out which user made these system calls. But when I run 'make', it throws me following error.
/home/mohsin/LKM/trapcall.c:245: error: implicit declaration of function 'getuid' Any suggestion would be appreciated.