Those who are ungodlike should be returned an error.

This commit is contained in:
Tom Rhodes 2005-04-16 18:41:00 +00:00
parent f0c2044bd9
commit 932d3e21cc

View File

@ -153,6 +153,12 @@ main(int argc, char *argv[])
if (argc != 1)
usage();
/* Print an error if a non-root user attemps to run the tests. */
if (getuid() != 0) {
fprintf(stderr, "Error! Only root may run this utility\n");
return (EXIT_FAILURE);
}
/*
* We can test some parts of the library without the MAC Framework
* and policy loaded, so run those tests before calling