mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
iptstate wrapper for connections.cgi
This commit is contained in:
@@ -5,6 +5,7 @@ usr/local/bin/backupctrl
|
|||||||
usr/local/bin/dhcpctrl
|
usr/local/bin/dhcpctrl
|
||||||
usr/local/bin/extrahdctrl
|
usr/local/bin/extrahdctrl
|
||||||
usr/local/bin/getipstat
|
usr/local/bin/getipstat
|
||||||
|
usr/local/bin/getiptstate
|
||||||
#usr/local/bin/iowrap
|
#usr/local/bin/iowrap
|
||||||
usr/local/bin/ipfirereboot
|
usr/local/bin/ipfirereboot
|
||||||
usr/local/bin/ipsecctrl
|
usr/local/bin/ipsecctrl
|
||||||
|
|||||||
@@ -59,7 +59,6 @@
|
|||||||
* centerim-4.22.1
|
* centerim-4.22.1
|
||||||
* clamav-0.93
|
* clamav-0.93
|
||||||
* cmake-2.4.8
|
* cmake-2.4.8
|
||||||
* collectd-4.3.0
|
|
||||||
* collectd-4.4.0
|
* collectd-4.4.0
|
||||||
* coreutils-5.96
|
* coreutils-5.96
|
||||||
* cpio-2.6
|
* cpio-2.6
|
||||||
@@ -242,7 +241,6 @@
|
|||||||
* rrdtool-1.2.15
|
* rrdtool-1.2.15
|
||||||
* rsync-2.6.9
|
* rsync-2.6.9
|
||||||
* rtorrent-0.7.9
|
* rtorrent-0.7.9
|
||||||
* samba-3.0.28a
|
|
||||||
* samba-3.0.29
|
* samba-3.0.29
|
||||||
* sane-1.0.19
|
* sane-1.0.19
|
||||||
* sane-1.0.19-kmod
|
* sane-1.0.19-kmod
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ undef (@dummy);
|
|||||||
my %netsettings=();
|
my %netsettings=();
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%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>;
|
my @active = <ACTIVE>;
|
||||||
close (ACTIVE);
|
close (ACTIVE);
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ SUID_PROGS = setdmzholes setportfw setxtaccess \
|
|||||||
ipsecctrl timectrl dhcpctrl snortctrl \
|
ipsecctrl timectrl dhcpctrl snortctrl \
|
||||||
applejuicectrl rebuildhosts backupctrl \
|
applejuicectrl rebuildhosts backupctrl \
|
||||||
logwatch openvpnctrl outgoingfwctrl \
|
logwatch openvpnctrl outgoingfwctrl \
|
||||||
wirelessctrl getipstat qosctrl launch-ether-wake \
|
wirelessctrl getipstat getiptstate qosctrl launch-ether-wake \
|
||||||
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
|
redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
|
||||||
smartctrl clamavctrl addonctrl pakfire mpfirectrl
|
smartctrl clamavctrl addonctrl pakfire mpfirectrl
|
||||||
|
|
||||||
|
|||||||
24
src/misc-progs/getiptstate.c
Normal file
24
src/misc-progs/getiptstate.c
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user