From: Ork Date: Wed, 9 Oct 2013 22:44:55 +0000 (+0200) Subject: Check for root user X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=95940a911c7bb9bf1c678b58e0a68c2e8c101410;p=evhz Check for root user --- diff --git a/evhz.c b/evhz.c index a34fd83..c4dd389 100644 --- a/evhz.c +++ b/evhz.c @@ -42,6 +42,11 @@ int main(int argc, char *argv[]) { } } + if(geteuid() != 0) { + printf("%s must be used as superuser", argv[0]); + return 1; + } + signal(SIGINT, sigint); printf("Press CTRL-C to exit.\n\n");