title: How to get userID when writing Linux kernel module
body: <p>Here is my function in my kernel module which I insert using <code>insmod</code> command after <code>make</code> at later stages. I am working on  <code>goldfish (2.6.29)</code></p>
  
  <pre><code>asmlinkage long our_sys_read(unsigned int fd, char  *buf, size_t count)
  {
        printk("-------&gt;&gt; our_sys_read getuid() ---------- %d\n", getuid());
  
        return original_call_read(fd,buf,count);
  }
  </code></pre>
  
  <p>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. </p>
  
  <pre><code>/home/mohsin/LKM/trapcall.c:245: error: implicit declaration of function 'getuid'
  </code></pre>
  
  <p>Any suggestion would be appreciated.</p>