From mboxrd@z Thu Jan 1 00:00:00 1970 From: git@ipfire.org To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, fifteen, updated. 30491c6ac70ce55d4bfbcec5aee6096808b3c193 Date: Sat, 11 Jan 2014 13:08:36 +0100 Message-ID: <20140111120836.76D05211F2@argus.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3067883741165929530==" List-Id: --===============3067883741165929530== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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, fifteen has been updated via 30491c6ac70ce55d4bfbcec5aee6096808b3c193 (commit) via 68e89a2f2828084bbe7a8fa15a16ae9626d4c74e (commit) via 8c252e6aa83f0a45d248dc59ae2bbc2ca717b229 (commit) via 7d44bfeef1614ca2ae0e60ddd020f004a3f3b071 (commit) via f536ab266173dd7d6ec5ddd984e0a458c1aedbc2 (commit) via aeefcc9caa329cfd1ca8b8cdafdc845aab7507b2 (commit) via 82f7d1b4d8f2d504ed750da549416a1110814cc6 (commit) from b5890e73693cb323b115cf5245964177cb902f64 (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 30491c6ac70ce55d4bfbcec5aee6096808b3c193 Merge: 68e89a2 b5890e7 Author: Michael Tremer Date: Sat Jan 11 13:08:27 2014 +0100 Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fi= fteen =20 Conflicts: html/html/themes/ipfire/include/css/style.css commit 68e89a2f2828084bbe7a8fa15a16ae9626d4c74e Merge: 8c252e6 0f9894a Author: Michael Tremer Date: Sat Jan 11 12:46:56 2014 +0100 Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fi= fteen commit 8c252e6aa83f0a45d248dc59ae2bbc2ca717b229 Author: Erik Kapfer Date: Sat Jan 11 12:38:53 2014 +0100 OpenVPN: Check if port is smaller than 1024. =20 Bug #10459. commit 7d44bfeef1614ca2ae0e60ddd020f004a3f3b071 Author: Alexander Marx Date: Sat Jan 11 06:05:29 2014 +0100 changes pagetitle in vpnmain.cgi commit f536ab266173dd7d6ec5ddd984e0a458c1aedbc2 Author: Alexander Marx Date: Sat Jan 11 05:51:44 2014 +0100 language changes in Menu and on statuspage (index.cgi) commit aeefcc9caa329cfd1ca8b8cdafdc845aab7507b2 Author: Alexander Marx Date: Sat Jan 11 05:30:46 2014 +0100 Firewall: modified firewall-groups so that they can be empty even if used= in rules =20 Now one can create a group, use it in a rule and then delete every entry from the group. (The firewallrule then will be displayed yellow and disabled). commit 82f7d1b4d8f2d504ed750da549416a1110814cc6 Author: Alexander Marx Date: Sat Jan 11 05:32:16 2014 +0100 Edited stylecss so that TR:first-child td {} has a top border (for firewa= ll rulecreation) ----------------------------------------------------------------------- Summary of changes: config/menu/40-services.menu | 2 +- config/menu/50-firewall.menu | 2 +- html/cgi-bin/firewall.cgi | 24 +++++- html/cgi-bin/fwhosts.cgi | 111 ++++++++++++++++--------= -- html/cgi-bin/index.cgi | 2 +- html/cgi-bin/ovpnmain.cgi | 26 +++++- html/cgi-bin/p2p-block.cgi | 0 html/cgi-bin/shutdown.cgi | 0 html/cgi-bin/tor.cgi | 0 html/cgi-bin/vpnmain.cgi | 20 ++--- html/html/themes/ipfire/include/css/style.css | 2 +- langs/de/cgi-bin/de.pl | 7 +- langs/en/cgi-bin/en.pl | 5 +- 13 files changed, 133 insertions(+), 68 deletions(-) mode change 100755 =3D> 100644 html/cgi-bin/firewall.cgi mode change 100755 =3D> 100644 html/cgi-bin/p2p-block.cgi mode change 100755 =3D> 100644 html/cgi-bin/shutdown.cgi mode change 100755 =3D> 100644 html/cgi-bin/tor.cgi Difference in files: diff --git a/config/menu/40-services.menu b/config/menu/40-services.menu index 9901e8f..2f4d96e 100644 --- a/config/menu/40-services.menu +++ b/config/menu/40-services.menu @@ -1,5 +1,5 @@ $subservices->{'10.ipsec'} =3D { - 'caption' =3D> 'IPSec', + 'caption' =3D> $Lang::tr{'ipsec'}, 'uri' =3D> '/cgi-bin/vpnmain.cgi', 'title' =3D> "$Lang::tr{'virtual private networking'}", 'enabled' =3D> 1, diff --git a/config/menu/50-firewall.menu b/config/menu/50-firewall.menu index 8bc66f9..ce6fd9d 100644 --- a/config/menu/50-firewall.menu +++ b/config/menu/50-firewall.menu @@ -17,7 +17,7 @@ 'enabled' =3D> 1, }; $subfirewall->{'40.p2p'} =3D { - 'caption' =3D> 'P2P-Block', + 'caption' =3D> $Lang::tr{'p2p block'}, 'uri' =3D> '/cgi-bin/p2p-block.cgi', 'title' =3D> "P2P-Block", 'enabled' =3D> 1, diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi old mode 100755 new mode 100644 index ceaab56..7ffe59c --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1050,7 +1050,7 @@ END if (! -z $configgrp || $optionsfw{'SHOWDROPDOWN'} eq 'on'){ print"$Lang::tr{'fwhost cust grp'}"; + #check if this group has only one entry + foreach my $key2 (keys %hash) { + if ($hash{$key2}<2 && $key2 eq $customgrp{$key}[0]){ + print "" ; + } + } } print""; =09 @@ -1793,11 +1793,15 @@ sub viewtableservicegrp my $grpname; my $remark; my $helper; + my $helper1; my $port; my $protocol; my $delflag; my $grpcount=3D0; my $col=3D''; + my $lastentry=3D0; + my @counter; + my %hash; if (! -z $configsrvgrp){ &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'}); &General::readhasharray("$configsrvgrp", \%customservicegrp); @@ -1807,6 +1811,12 @@ sub viewtableservicegrp &General::readhasharray("$fwconfigout", \%fwout); my $number=3D keys %customservicegrp; foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b= }[0]) } sort { ncmp($customservicegrp{$a}[2],$customservicegrp{$b}[2]) }keys = %customservicegrp){ + push (@counter,$customservicegrp{$key}[0]); + } + foreach my $key1 (@counter) { + $hash{$key1}++ ; + } + foreach my $key (sort { ncmp($customservicegrp{$a}[0],$customservicegrp{$b= }[0]) } sort { ncmp($customservicegrp{$a}[2],$customservicegrp{$b}[2]) }keys = %customservicegrp){ $count++; if ($helper ne $customservicegrp{$key}[0]){ #Get used groupcounter @@ -1823,12 +1833,12 @@ sub viewtableservicegrp } $grpname=3D$customservicegrp{$key}[0]; if ($customservicegrp{$key}[2] eq "none"){ - $customservicegrp{$key}[2]=3D$Lang::tr{'fwhost empty'}; + $customservicegrp{$key}[2]=3D$Lang::tr{'fwhost err emptytable'}; $port=3D''; $protocol=3D''; } $remark=3D"$customservicegrp{$key}[1]"; - if($count >=3D2){print"";} + if($count >0){print"";$count=3D1;} print "
$grpname    "; print "$Lang::tr{'remark'}:  $remark " if ($remark ne ''); print "  $Lang::tr{'used'}: $grpcount x"; @@ -1849,6 +1859,11 @@ sub viewtableservicegrp print""; $col=3D"bgcolor=3D'$color{'color22'}'"; } + #make lines yellow if it is a dummy entry + if ($customservicegrp{$key}[2] eq $Lang::tr{'fwhost err emptytable'}){ + print""; + $col=3D"bgcolor=3D'${Header::colouryellow}'"; + } #Set fields if we use protocols in servicegroups if ($customservicegrp{$key}[2] ne 'TCP' || $customservicegrp{$key}[2] ne = 'UDP' || $customservicegrp{$key}[2] ne 'ICMP'){ $port=3D'-'; @@ -1868,8 +1883,16 @@ sub viewtableservicegrp } } print"$port$prot= ocol
"; - if ($delflag gt '1'){ - print""; + if ($delflag gt '0'){ + if ($customservicegrp{$key}[2] ne $Lang::tr{'fwhost err emptytable'}){ + print""; + } + #check if this group has only one entry + foreach my $key2 (keys %hash) { + if ($hash{$key2}<2 && $key2 eq $customservicegrp{$key}[0]){ + print "" ; + } + } } print""; if($protocol eq 'TCP' || $protocol eq 'UDP' || $protocol eq 'ICMP'){ diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 5143e5e..b3a2629 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -286,7 +286,7 @@ if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=3Don` = || $haveipsec=3D1; my $ipsecip =3D `cat /var/ipfire/vpn/settings | grep ^VPN_IP=3D | cut -c 8-= `; print<$Lang::tr{'v= pn'}
+ $Lang::tr{'i= psec'}
$ipsecip Onli= ne END diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 7b1654f..75b6c75 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -1163,6 +1163,12 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgip= arams{'TYPE'} eq '' && $cg $errormessage =3D $Lang::tr{'invalid port'}; goto SETTINGS_ERROR; } +=09 + if ($cgiparams{'DDEST_PORT'} <=3D 1023) { + $errormessage =3D $Lang::tr{'ovpn port in root range'}; + goto SETTINGS_ERROR; + } + $vpnsettings{'ENABLED_BLUE'} =3D $cgiparams{'ENABLED_BLUE'}; $vpnsettings{'ENABLED_ORANGE'} =3D$cgiparams{'ENABLED_ORANGE'}; $vpnsettings{'ENABLED'} =3D $cgiparams{'ENABLED'}; @@ -3534,10 +3540,24 @@ if ($cgiparams{'TYPE'} eq 'net') { unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'= NAME'}.conf") or die "Removing Configfile fail: $!"; rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; goto VPNCONF_ERROR; - }=20 + } +=09 + if ($cgiparams{'DEST_PORT'} <=3D 1023) { + $errormessage =3D $Lang::tr{'ovpn port in root range'}; + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'= NAME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; + goto VPNCONF_ERROR; + } =20 - if ($cgiparams{'OVPN_MGMT'} eq '') { - $cgiparams{'OVPN_MGMT'} =3D $cgiparams{'DEST_PORT'}; =09 + if ($cgiparams{'OVPN_MGMT'} eq '') { + $cgiparams{'OVPN_MGMT'} =3D $cgiparams{'DEST_PORT'}; =09 + } +=09 + if ($cgiparams{'OVPN_MGMT'} <=3D 1023) { + $errormessage =3D $Lang::tr{'ovpn mgmt in root range'}; + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'= NAME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Re= moving Directory fail: $!"; + goto VPNCONF_ERROR; } =20 } diff --git a/html/cgi-bin/p2p-block.cgi b/html/cgi-bin/p2p-block.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/shutdown.cgi b/html/cgi-bin/shutdown.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 3e92d4b..7e90649 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -511,7 +511,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'} && $cgipara= ms{'TYPE'} eq '' && $cg ### } elsif ($cgiparams{'ACTION'} eq $Lang::tr{'remove x509'}) { &Header::showhttpheaders(); - &Header::openpage($Lang::tr{'vpn configuration main'}, 1, ''); + &Header::openpage($Lang::tr{'ipsec'}, 1, ''); &Header::openbigbox('100%', 'left', '', ''); &Header::openbox('100%', 'left', $Lang::tr{'are you sure'}); print < 'IPFire Seite ist ung=C3=BCltig.', 'ipfires hostname' =3D> 'IPFire\'s Hostname', 'ipinfo' =3D> 'IP-Info', -'ipsec network' =3D> 'IPsec-Netzwerke', 'iptable rules' =3D> 'IPTable-Regeln', 'iptmangles' =3D> 'IPTable Mangles', +'ipsec' =3D> 'IPsec', +'ipsec network' =3D> 'IPsec-Netzwerke', 'iptnats' =3D> 'IPTable Network Address Translation', 'ipts' =3D> 'iptables', 'isdn' =3D> 'ISDN', @@ -1605,6 +1606,8 @@ 'ovpn on blue' =3D> 'OpenVPN auf BLAU', 'ovpn on orange' =3D> 'OpenVPN auf ORANGE', 'ovpn on red' =3D> 'OpenVPN auf ROT', +'ovpn mgmt in root range' =3D> 'Ein Port von 1024 oder h=C3=B6her ist erford= erlich.', +'ovpn port in root range' =3D> 'Ein Port von 1024 oder h=C3=B6her ist erford= erlich.', 'ovpn routes push' =3D> 'Routen (eine pro Zeile) z.b. 192.168.10.0/255.255.2= 55.0 192.168.20.0/24', 'ovpn routes push options' =3D> 'Route push Optionen', 'ovpn server status' =3D> 'OpenVPN-Server-Status', @@ -1627,7 +1630,7 @@ 'ovpn_processprioVH' =3D> 'Sehr Hoch', 'ovpnstatus log' =3D> 'OVPN-Status-Log', 'ovpnsys log' =3D> 'OVPN-System-Log', -'p2p block' =3D> 'P2P-Block', +'p2p block' =3D> 'P2P-Netzwerke', 'p2p block save notice' =3D> 'Bitte lesen Sie die Firewallregeln neu ein, da= mit die =C3=84nderungen aktiv werden.', 'package failed to install' =3D> 'Programmpaket konnte nicht installiert wer= den.', 'pagerefresh' =3D> 'Seite wird aktualisiert. Bitte warten.', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index f04a17e..3d9a5eb 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1298,6 +1298,7 @@ 'ipfire side is invalid' =3D> 'IPFire side is invalid.', 'ipfires hostname' =3D> 'IPFire\'s Hostname', 'ipinfo' =3D> 'IP info', +'ipsec' =3D> 'IPsec', 'ipsec network' =3D> 'IPsec network', 'iptable rules' =3D> 'IPTable rules', 'iptmangles' =3D> 'IPTable Mangles', @@ -1635,6 +1636,8 @@ 'ovpn on blue' =3D> 'OpenVPN on BLUE', 'ovpn on orange' =3D> 'OpenVPN on ORANGE', 'ovpn on red' =3D> 'OpenVPN on RED', +'ovpn mgmt in root range' =3D> 'A port number of 1024 or higher is required.= ', +'ovpn port in root range' =3D> 'A port number of 1024 or higher is required.= ', 'ovpn routes push' =3D> 'Routes (one per line) e.g. 192.168.10.0/255.255.255= .0 192.168.20.0/24', 'ovpn routes push options' =3D> 'Route push options', 'ovpn server status' =3D> 'Current OpenVPN server status:', @@ -1657,7 +1660,7 @@ 'ovpn_processprioVH' =3D> 'Very high', 'ovpnstatus log' =3D> 'OVPN-Status-Log', 'ovpnsys log' =3D> 'OVPN-System-Log', -'p2p block' =3D> 'P2P block', +'p2p block' =3D> 'P2P networks', 'p2p block save notice' =3D> 'Please reload the firewall ruleset in order to= apply your changes.', 'package failed to install' =3D> 'Package failed to install.', 'pagerefresh' =3D> 'Page is beeing refreshed, please wait.', hooks/post-receive -- IPFire 2.x development tree --===============3067883741165929530==--