summaryrefslogtreecommitdiff
path: root/src/revenge_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/revenge_main.c')
-rw-r--r--src/revenge_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/revenge_main.c b/src/revenge_main.c
index b78a7d5..06e8279 100644
--- a/src/revenge_main.c
+++ b/src/revenge_main.c
@@ -2,7 +2,7 @@
* $Id$
* Copyright (C) 2007 Christoph Brill <egore911@egore911.de>
* Copyright (C) 2007 Maciej Cencora <m.cencora@gmail.com>
- * Copyright (C) 2007 Oliver McFadden <z3ro.geek@gmail.com>
+ * Copyright (C) 2007 Oliver McFadden <omcfadde@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -122,6 +122,13 @@ main (int argc, char **argv)
int opt;
int revenge_rand;
+ if (getuid () != 0)
+ {
+ fprintf (stderr, "%s: %s:%d: you are not root! http://xkcd.com/149/\n",
+ program_invocation_short_name, __FILE__, __LINE__);
+ exit (EXIT_FAILURE);
+ }
+
srand (time (NULL));
revenge_rand = rand () & 0xffff;