]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
iptstate wrapper for connections.cgi
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 26 May 2008 15:35:47 +0000 (17:35 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 26 May 2008 15:35:47 +0000 (17:35 +0200)
config/rootfiles/common/misc-progs
doc/packages-list.txt
html/cgi-bin/connections.cgi
src/misc-progs/Makefile
src/misc-progs/getiptstate.c [new file with mode: 0644]

index 6d66c248a3f0d4296b1abb7cafabd6c1597e9f6f..beadf06af5ce3a2cdf7f31bc5d38d22fb745fee0 100644 (file)
@@ -5,6 +5,7 @@ usr/local/bin/backupctrl
 usr/local/bin/dhcpctrl
 usr/local/bin/extrahdctrl
 usr/local/bin/getipstat
+usr/local/bin/getiptstate
 #usr/local/bin/iowrap
 usr/local/bin/ipfirereboot
 usr/local/bin/ipsecctrl
index 437cbc425761281c2810915d56cf9881b5873c76..8f775882496489ec34e7e9a8ed5027e63192ffab 100644 (file)
@@ -59,7 +59,6 @@
 * centerim-4.22.1
 * clamav-0.93
 * cmake-2.4.8
-* collectd-4.3.0
 * collectd-4.4.0
 * coreutils-5.96
 * cpio-2.6
 * rrdtool-1.2.15
 * rsync-2.6.9
 * rtorrent-0.7.9
-* samba-3.0.28a
 * samba-3.0.29
 * sane-1.0.19
 * sane-1.0.19-kmod
index fd95f239b7b42b9ad6cdef5c0c5f8ecf73d9bbee..9cf4f68520fd8742b1aaeb1bb9ef1c1de4c0bfbc 100644 (file)
@@ -44,7 +44,7 @@ undef (@dummy);
 my %netsettings=();
 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
 
-open (ACTIVE, 'iptstate -1rbt |') or die 'Unable to open ip_conntrack';
+open (ACTIVE, '/usr/local/bin/getiptstate |') or die 'Unable to open ip_conntrack';
 my @active = <ACTIVE>;
 close (ACTIVE);
 
index 9530a25406530c01757db46c748a1e6c810a7e75..0691d2fa7f6812c5d8ec5d7b9a06be01faa4ddbc 100644 (file)
@@ -29,7 +29,7 @@ SUID_PROGS = setdmzholes setportfw setxtaccess \
        ipsecctrl timectrl dhcpctrl snortctrl \
        applejuicectrl rebuildhosts backupctrl \
        logwatch openvpnctrl outgoingfwctrl \
-       wirelessctrl getipstat qosctrl launch-ether-wake \
+       wirelessctrl getipstat getiptstate qosctrl launch-ether-wake \
        redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
        smartctrl clamavctrl addonctrl pakfire mpfirectrl
 
diff --git a/src/misc-progs/getiptstate.c b/src/misc-progs/getiptstate.c
new file mode 100644 (file)
index 0000000..338b531
--- /dev/null
@@ -0,0 +1,24 @@
+/* IPFire helper program - IPStat
+ *
+ * Get the list from IPTABLES -L
+ * 
+ */
+         
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "setuid.h"
+
+
+int main(void)
+{
+       if (!(initsetuid()))
+               exit(1);
+       
+       safe_system("/usr/sbin/iptstate -1rbt");
+       return 0;
+}
+