I'm trying to modify Linux kernel and I need to get the user ID and the process group ID from a task_struct
and a pid_namespace
. Although I searched their definitions in the source code, I couldn't find any global variables or functions (maybe I am missing because of the lack of the comments in codes) to access them.
Is there a method to get those inside the kernel space since I can not use user-space functions like getuid()
, etc.?