2015-03-03 03:34:27 +08:00
|
|
|
// RUN: %clangxx_msan -O0 %s -o %t && %run %t
|
2013-10-22 20:24:48 +08:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <grp.h>
|
2015-05-06 17:26:35 +08:00
|
|
|
#include <unistd.h> // FreeBSD declares initgroups() here.
|
2013-10-22 20:24:48 +08:00
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
initgroups("root", 0);
|
|
|
|
// The above fails unless you are root. Does not matter, MSan false positive
|
|
|
|
// (which we are testing for) happens anyway.
|
|
|
|
return 0;
|
|
|
|
}
|