/** * https://man.openbsd.org/getuid */ #include #include void main(int argc, char const *argv[]) { uid_t user = getuid(); uid_t privs = geteuid(); printf("User: %u\n", user); printf("Privs: %u\n", privs); puts("::"); char *login = getlogin(); printf("%s\n", login); }