iptstate wrapper for connections.cgi

This commit is contained in:
Arne Fitzenreiter
2008-05-26 17:35:47 +02:00
parent 87846bb3cb
commit f65b2fb8b6
5 changed files with 27 additions and 4 deletions

View 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

View 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
@@ -242,7 +241,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

View 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);

View 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

View File

@@ -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;
}