title: Is there a way to find out what user owns a process from the process's task_struct?
body: <p>I have a <code>task_struct *</code> that I got by calling <code>find_task_by_vpid(get_pid())</code>. I'd like to figure out what user owns that process so that I can do some permission checking in the system call I'm writing, but looking through the <code>task_struct</code> source code hasn't helped much. The only thing that looked helpful is the <code>loginuid</code>, but for some reason the kernel won't compile if I try to access it like this: <code>my_task_struct-&gt;loginuid</code>. Is there another way to get the user who called the process from the <code>task_struct</code>?</p>