52306a7
cb7abfb
1 2 3 4 5
6
7 8 9 10 11 12 13
#include "whoami.h" int main(void) { struct passwd *p; if (!(p = getpwuid(getuid()))) { exit(EXIT_FAILURE); } printf("%s\n", p->pw_name); exit(EXIT_SUCCESS); }