1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145165

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