1

I am trying to get the uid of the process calling dns files in bionic libc. I know using current->cred->uid.val is used to get the uid in android/linux kernel, but how to get the uid in bionic libc. I don't think the same will work. Can you please suggest me a way to get uid in bionic libc and what headers to use?

1 Answers1

1

The header is <unistd.h>, the functions are getuid, geteuid, getresuid and so on, depending on which kind of UID you need.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92