forwardctrl: Remove unused and possibly dangerous flush option.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Aug 2013 12:42:16 +0000 (14:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 Aug 2013 12:42:16 +0000 (14:42 +0200)
Also remove unused header files.

src/misc-progs/forwardfwctrl.c

index a02b462bad5884b27609d8dd6cfbc8dc10d8cbb2..797d27ac56cac6b008ecab61fbe3bb69297cddbf 100644 (file)
@@ -5,23 +5,12 @@
  *
  */
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
 #include "setuid.h"
 
 int main(int argc, char *argv[]) {
-
        if (!(initsetuid()))
                exit(1);
 
-       if(argc > 1)
-               safe_system("/var/ipfire/forward/bin/rules.pl flush");
-       else
-               safe_system("/var/ipfire/forward/bin/rules.pl");
-       
+       safe_system("/var/ipfire/forward/bin/rules.pl");
        return 0;
 }