xref: /llvm-project/compiler-rt/test/sanitizer_common/TestCases/NetBSD/uid_from_user.cpp (revision 74989aff5351beaeb03f46fc2fe57752d57f848b)
1 // RUN: %clangxx -O0 -g %s -o %t && %run %t
2 
3 #include <pwd.h>
4 #include <stdlib.h>
5 
main(void)6 int main(void) {
7   uid_t nobody;
8 
9   if (uid_from_user("nobody", &nobody) == -1)
10     exit(1);
11 
12   if (nobody)
13     exit(0);
14 
15   return 0;
16 }
17