iankelling.org
/
git
/
evhz
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86e80de
)
Check for root user
author
Ork
<ork@olol.eu>
Wed, 9 Oct 2013 22:44:55 +0000
(
00:44
+0200)
committer
Ork
<ork@olol.eu>
Wed, 9 Oct 2013 22:44:55 +0000
(
00:44
+0200)
evhz.c
patch
|
blob
|
history
diff --git
a/evhz.c
b/evhz.c
index a34fd83277723d9397905669bc8a47451ef10a1b..c4dd389763c5490748809a03db2d8b89a2494258 100644
(file)
--- 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");