This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 77cdccf4c0a2b1c0a2b8d6e4aab86fbcbd5439b9 (commit) via ac69a292a8b41224b31e7dd8c0335e3d9b604129 (commit) via d68ead3decfdcc4ca4a1413e33f3c47270799836 (commit) from 935f05065e79ec06b529a44631ffcf50199d8cf0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 77cdccf4c0a2b1c0a2b8d6e4aab86fbcbd5439b9 Author: Matthias Fischer matthias.fischer@ipfire.org Date: Sun Apr 16 23:01:33 2017 +0200
BUG 11318: Fix deletion of temporary files from IPTables-GUI
For details see: https://bugzilla.ipfire.org/show_bug.cgi?id=11318
Temporary files for 'iptables', 'iptablesmangle' and 'iptablesnat' created by 'iptables.cgi' were not deleted after use but stayed in '/srv/weg/ipfire/html/'.
As a workaround I changed 'getipstat.c' to create these files in '/var/tmp' and the "open (file..." and "rm" commands in 'iptables.cgi'.
Works here.
Best, Matthias
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit ac69a292a8b41224b31e7dd8c0335e3d9b604129 Author: Matthias Fischer matthias.fischer@ipfire.org Date: Mon Apr 17 14:25:59 2017 +0200
libevent2-compat: newpackage
Keeps older packages that have been linked against this version of libevent2 working.
Best, Matthias
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit d68ead3decfdcc4ca4a1413e33f3c47270799836 Author: Matthias Fischer matthias.fischer@ipfire.org Date: Mon Apr 17 00:16:02 2017 +0200
Fix for guardian-CGI: As a result of fixing BUG11318
This is necessary because commit bf1985fae5baca327fcded31264f45638442f02e changes the place where temporary files from 'iptables' are stored.
Some typos where fixed, too.
Best, Matthias
Signed-off-by: Matthias Fischer matthias.fischer@ipfire.org Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/common/libevent2-compat | 10 ++++++++++ html/cgi-bin/guardian.cgi | 28 ++++++++++++++-------------- html/cgi-bin/iptables.cgi | 12 ++++++------ lfs/{libevent2 => libevent2-compat} | 18 ++++++++++++++++-- make.sh | 1 + src/misc-progs/getipstat.c | 12 ++++++------ 6 files changed, 53 insertions(+), 28 deletions(-) create mode 100644 config/rootfiles/common/libevent2-compat copy lfs/{libevent2 => libevent2-compat} (79%)
Difference in files: diff --git a/config/rootfiles/common/libevent2-compat b/config/rootfiles/common/libevent2-compat new file mode 100644 index 0000000..edeb449 --- /dev/null +++ b/config/rootfiles/common/libevent2-compat @@ -0,0 +1,10 @@ +usr/lib/libevent-2.0.so.5 +usr/lib/libevent-2.0.so.5.1.9 +usr/lib/libevent_core-2.0.so.5 +usr/lib/libevent_core-2.0.so.5.1.9 +usr/lib/libevent_extra-2.0.so.5 +usr/lib/libevent_extra-2.0.so.5.1.9 +usr/lib/libevent_openssl-2.0.so.5 +usr/lib/libevent_openssl-2.0.so.5.1.9 +usr/lib/libevent_pthreads-2.0.so.5 +usr/lib/libevent_pthreads-2.0.so.5.1.9 diff --git a/html/cgi-bin/guardian.cgi b/html/cgi-bin/guardian.cgi index 963a564..e15501e 100644 --- a/html/cgi-bin/guardian.cgi +++ b/html/cgi-bin/guardian.cgi @@ -120,7 +120,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage = "$Lang::tr{'guardian invalid blocktime'}"; }
- # Check if the bloccount is valid. + # Check if the blockcount is valid. unless(($settings{'GUARDIAN_BLOCKCOUNT'} =~ /^\d+$/) && ($settings{'GUARDIAN_BLOCKCOUNT'} ne "0")) { $errormessage = "$Lang::tr{'guardian invalid blockcount'}"; } @@ -183,7 +183,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
# Generate the ID for the new entry. # - # Sort the keys by it's ID and store them in an array. + # Sort the keys by their ID and store them in an array. my @keys = sort { $a <=> $b } keys %ignored;
# Reverse the key array. @@ -664,11 +664,11 @@ sub showIgnoreBox() { <td class='base' colspan='3' bgcolor='$color{'color20'}'></td> </tr> END - # Check if some hosts have been add to be ignored. + # Check if some hosts have been added to be ignored. if (keys (%ignored)) { my $col = "";
- # Loop through all entries of the hash.. + # Loop through all entries of the hash. while( (my $key) = each %ignored) { # Assign data array positions to some nice variable names. my $address = $ignored{$key}[0]; @@ -784,7 +784,7 @@ END &Header::closebox(); }
-# Function to list currently bocked addresses from guardian and unblock them or add custom entries to block. +# Function to list currently blocked addresses from guardian and unblock them or add custom entries to block. sub showBlockedBox() { &Header::openbox('100%', 'center', $Lang::tr{'guardian blocked hosts'});
@@ -795,7 +795,7 @@ sub showBlockedBox() { </tr> END
- # Lauch function to get the currently blocked hosts. + # Launch function to get the currently blocked hosts. my @blocked_hosts = &GetBlockedHosts();
my $id = 0; @@ -828,7 +828,7 @@ END END }
- # If the loop only has been runs once the id still is "0", which means there are no + # If the loop only has been run once the id still is "0", which means there are no # additional entries (blocked hosts) in the iptables chain. if ($id == 0) {
@@ -890,11 +890,11 @@ sub GetBlockedHosts() { # Create new, empty array. my @hosts;
- # Lauch helper to get chains from iptables. + # Launch helper to get chains from iptables. system('/usr/local/bin/getipstat');
# Open temporary file which contains the chains and rules. - open (FILE, '/srv/web/ipfire/html/iptables.txt'); + open (FILE, '/var/tmp/iptables.txt');
# Loop through the entire file. while (<FILE>) { @@ -909,7 +909,7 @@ sub GetBlockedHosts() { next if ($line =~ /^Chain/); next if ($line =~ /^ pkts/);
- # Generate array, based on the line content (seperator is a single or multiple space's) + # Generate array, based on the line content (separator is a single or multiple space) my @comps = split(/\s{1,}/, $line); my ($lead, $pkts, $bytes, $target, $prot, $opt, $in, $out, $source, $destination) = @comps;
@@ -927,9 +927,9 @@ sub GetBlockedHosts() { close(FILE);
# Remove recently created temporary files of the "getipstat" binary. - system(rm -f "/srv/web/ipfire/html/iptables.txt"); - system(rm -f "/srv/web/ipfire/html/iptablesmangle.txt"); - system(rm -f "/srv/web/ipfire/html/iptablesnat.txt"); + system("rm -f /var/tmp/iptables.txt"); + system("rm -f /var/tmp/iptablesmangle.txt"); + system("rm -f /var/tmp/iptablesnat.txt");
# Convert entries, sort them, write back and store the sorted entries into new array. my @sorted = map { $_->[0] } @@ -947,7 +947,7 @@ sub BuildConfiguration() {
my $configfile = "${General::swroot}/guardian/guardian.conf";
- # Create the configfile if not exist yet. + # Create the configfile if none exists yet. unless (-e "$configfile") { system("touch $configfile"); }
# Open configfile for writing. diff --git a/html/cgi-bin/iptables.cgi b/html/cgi-bin/iptables.cgi index 30fce27..b52d74f 100644 --- a/html/cgi-bin/iptables.cgi +++ b/html/cgi-bin/iptables.cgi @@ -88,7 +88,7 @@ END # start with an Chain the the name, start- and endline of the # chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptables.txt'); + open (FILE, '/var/tmp/iptables.txt'); while (<FILE>){
$iplines[$lines] = $_; @@ -210,7 +210,7 @@ END # start with an Chain the the name, start- and endline of the # chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptablesmangle.txt'); + open (FILE, '/var/tmp/iptablesmangle.txt'); while (<FILE>){
$ipmlines[$manlines] = $_; @@ -337,7 +337,7 @@ END # start with an Chain the the name, start- and endline of the # chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptablesnat.txt'); + open (FILE, '/var/tmp/iptablesnat.txt'); while (<FILE>){
$ipnatlines[$natlines] = $_; @@ -434,6 +434,6 @@ print "</table></div><br />"; &Header::closebigbox(); &Header::closepage();
-system(rm -f "/srv/web/ipfire/html/iptables.txt"); -system(rm -f "/srv/web/ipfire/html/iptablesmangle.txt"); -system(rm -f "/srv/web/ipfire/html/iptablesnat.txt"); +system("rm -f /var/tmp/iptables.txt"); +system("rm -f /var/tmp/iptablesmangle.txt"); +system("rm -f /var/tmp/iptablesnat.txt"); diff --git a/lfs/libevent2-compat b/lfs/libevent2-compat new file mode 100644 index 0000000..954b7dd --- /dev/null +++ b/lfs/libevent2-compat @@ -0,0 +1,95 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2017 IPFire Team info@ipfire.de # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.0.22-stable + +THISAPP = libevent-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = c4c56f986aa985677ca1db89630a2e11 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure \ + --prefix=/usr \ + --disable-static + + cd $(DIR_APP) && make $(MAKETUNING) + + cd $(DIR_APP) && install -m 755 .libs/libevent-2.0.so.5.1.9 /usr/lib + ln -svf libevent-2.0.so.5.1.9 /usr/lib/libevent-2.0.so.5 + + cd $(DIR_APP) && install -m 755 .libs/libevent_core-2.0.so.5.1.9 /usr/lib + ln -svf libevent_core-2.0.so.5.1.9 /usr/lib/libevent_core-2.0.so.5 + + cd $(DIR_APP) && install -m 755 .libs/libevent_extra-2.0.so.5.1.9 /usr/lib + ln -svf libevent_extra-2.0.so.5.1.9 /usr/lib/libevent_extra-2.0.so.5 + + cd $(DIR_APP) && install -m 755 .libs/libevent_openssl-2.0.so.5.1.9 /usr/lib + ln -svf libevent_openssl-2.0.so.5.1.9 /usr/lib/libevent_openssl-2.0.so.5 + + cd $(DIR_APP) && install -m 755 .libs/libevent_pthreads-2.0.so.5.1.9 /usr/lib + ln -svf libevent_pthreads-2.0.so.5.1.9 /usr/lib/libevent_pthreads-2.0.so.5 + + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 7fe25b5..a87f706 100755 --- a/make.sh +++ b/make.sh @@ -491,6 +491,7 @@ buildipfire() { ipfiremake nettle ipfiremake libevent ipfiremake libevent2 + ipfiremake libevent2-compat ipfiremake expat ipfiremake unbound ipfiremake gnutls diff --git a/src/misc-progs/getipstat.c b/src/misc-progs/getipstat.c index 3870168..c806d54 100644 --- a/src/misc-progs/getipstat.c +++ b/src/misc-progs/getipstat.c @@ -3,7 +3,7 @@ * Get the list from IPTABLES -L * */ - + #include <stdio.h> #include <string.h> #include <unistd.h> @@ -17,11 +17,11 @@ int main(void) { if (!(initsetuid())) exit(1); - - safe_system("/sbin/iptables -L -v -n > /srv/web/ipfire/html/iptables.txt"); - safe_system("/sbin/iptables -L -v -n -t nat > /srv/web/ipfire/html/iptablesnat.txt"); - safe_system("/sbin/iptables -t mangle -L -v -n > /srv/web/ipfire/html/iptablesmangle.txt"); - safe_system("chown nobody.nobody /srv/web/ipfire/html/iptables.txt /srv/web/ipfire/html/iptablesnat.txt /srv/web/ipfire/html/iptablesmangle.txt"); + + safe_system("/sbin/iptables -L -v -n > /var/tmp/iptables.txt"); + safe_system("/sbin/iptables -L -v -n -t nat > /var/tmp/iptablesnat.txt"); + safe_system("/sbin/iptables -t mangle -L -v -n > /var/tmp/iptablesmangle.txt"); + safe_system("chown nobody.nobody /var/tmp/iptables.txt /var/tmp/iptablesnat.txt /var/tmp/iptablesmangle.txt"); return 0; }
hooks/post-receive -- IPFire 2.x development tree