aboutsummaryrefslogtreecommitdiff
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
parentf759cd3befb46a7d1a386a1d92c0350c3433400b (diff)
downloadNetNuke-8a7e1f1f3007136f06049a0b89d71dda70ab0a6f.tar.gz
Small changes.
-rw-r--r--Makefile8
-rw-r--r--netnuke.c10
2 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6676c01..578abf1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
CFLAGS=-std=c99 -Wall -pipe -O2
+DEFINES=
LFLAGS=-lutil -ltermcap
-OUTPUT=netnuke
+PACKAGE=netnuke
all:
- cc -o ${OUTPUT} ${LFLAGS} ${CFLAGS} netnuke.c
+ gcc $(SVNDEF) -o $(PACKAGE) $(DEFINES) $(CFLAGS) $(LFLAGS) netnuke.c
+ strip netnuke
+clean:
+ rm netnuke
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;