I just wonder, how can we determine if the current process is running as root or not. after searching on google, I found out that Linux has a field called "current" that I can use to determine who is running a particular process. I try to use
current->uid == 0
However, when I try to compile my code I get this error
struct task_structâ has no member named âuidâ
did I do something wrong? additionally, is it true if the process run as root, the uid always equal to zero? thanks