aboutsummaryrefslogtreecommitdiff
path: root/netnuke.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2009-09-17 08:36:26 -0400
committerJoseph Hunkeler <jhunk@stsci.edu>2009-09-17 08:36:26 -0400
commit8a7e1f1f3007136f06049a0b89d71dda70ab0a6f (patch)
treea12fa7a85b7a42c24354cc83bb75341582c05690 /netnuke.c
parentf759cd3befb46a7d1a386a1d92c0350c3433400b (diff)
downloadNetNuke-8a7e1f1f3007136f06049a0b89d71dda70ab0a6f.tar.gz
Small changes.
Diffstat (limited to 'netnuke.c')
-rw-r--r--netnuke.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/netnuke.c b/netnuke.c
index 7983a08..9e81cf7 100644
--- a/netnuke.c
+++ b/netnuke.c
@@ -480,7 +480,8 @@ int filterArg(const char* key, char* value, short flags)
int main(int argc, char* argv[])
{
- printf("\033[2J");
+ /* ANSI clear-screen sequence */
+ //printf("\033[2J");
int tok = 0;
/* Static arguments that must happen first */
@@ -566,6 +567,13 @@ int main(int argc, char* argv[])
}
}
+ /* Check for root privs before going any further */
+ if((getuid()) != 0)
+ {
+ fprintf(stderr, "You must be root first, sorry.\n");
+ exit(3);
+ }
+
int i = 0;
int mt = 0;