From: Michael Tremer Date: Wed, 21 Aug 2013 15:40:44 +0000 (+0200) Subject: Merge remote-tracking branch 'ms/xss' into next X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=df05a856cdc5044398284b1a8dc704b22dfca911;hp=5ba9e6606e0a9666fb2bf83c68f1979f9dd2fbb2 Merge remote-tracking branch 'ms/xss' into next --- diff --git a/config/cfgroot/useragents b/config/cfgroot/useragents index 5fe3446c6..d5164fd63 100644 --- a/config/cfgroot/useragents +++ b/config/cfgroot/useragents @@ -11,7 +11,7 @@ GOZILLA,Go!Zilla,(Go!Zilla) GOOGLE,Google Toolbar,(Google\sToolbar) JAVA,Java,(Java) KONQUEROR,Konqueror,(Konqueror) -LIBWWWPERL,libwww-perl,(libww-perl) +LIBWWWPERL,libwww-perl,(libwww-perl) LYNX,Lynx,(Lynx) MSIE,Internet Explorer,(MSIE.*[)]$) NETSCAPE,Netscape,(^Mozilla\/4.[7|8])|(Netscape) diff --git a/config/rootfiles/common/HTML-Template b/config/rootfiles/common/HTML-Template new file mode 100644 index 000000000..4b486d94e --- /dev/null +++ b/config/rootfiles/common/HTML-Template @@ -0,0 +1,7 @@ +usr/lib/perl5/site_perl/5.12.3/HTML/Template +usr/lib/perl5/site_perl/5.12.3/HTML/Template.pm +usr/lib/perl5/site_perl/5.12.3/HTML/Template/FAQ.pm +#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/HTML/Template +#usr/lib/perl5/site_perl/5.12.3/MACHINE-linux-thread-multi/auto/HTML/Template/.packlist +#usr/share/man/man3/HTML::Template.3 +#usr/share/man/man3/HTML::Template::FAQ.3 diff --git a/config/rootfiles/core/73/exclude b/config/rootfiles/core/73/exclude new file mode 100644 index 000000000..321a931ca --- /dev/null +++ b/config/rootfiles/core/73/exclude @@ -0,0 +1,17 @@ +srv/web/ipfire/html/proxy.pac +boot/config.txt +etc/udev/rules.d/30-persistent-network.rules +etc/collectd.custom +etc/shadow +etc/ipsec.conf +etc/ipsec.secrets +etc/ipsec.user.conf +etc/ipsec.user.secrets +var/log/cache +var/updatecache +etc/localtime +var/ipfire/ovpn +etc/ssh/ssh_config +etc/ssh/sshd_config +etc/ssl/openssl.cnf +var/state/dhcp/dhcpd.leases diff --git a/config/rootfiles/core/73/filelists/HTML-Template b/config/rootfiles/core/73/filelists/HTML-Template new file mode 120000 index 000000000..f17c1da69 --- /dev/null +++ b/config/rootfiles/core/73/filelists/HTML-Template @@ -0,0 +1 @@ +../../../common/HTML-Template \ No newline at end of file diff --git a/config/rootfiles/core/73/filelists/files b/config/rootfiles/core/73/filelists/files new file mode 100644 index 000000000..6a5876631 --- /dev/null +++ b/config/rootfiles/core/73/filelists/files @@ -0,0 +1,6 @@ +etc/system-release +etc/issue +srv/web/ipfire/html/redirect.cgi +srv/web/ipfire/html/redirect-templates/ +var/ipfire/langs +var/ipfire/proxy/advanced/useragents diff --git a/config/rootfiles/core/73/meta b/config/rootfiles/core/73/meta new file mode 100644 index 000000000..d547fa86f --- /dev/null +++ b/config/rootfiles/core/73/meta @@ -0,0 +1 @@ +DEPS="" diff --git a/config/rootfiles/core/73/update.sh b/config/rootfiles/core/73/update.sh new file mode 100644 index 000000000..446e8a0ba --- /dev/null +++ b/config/rootfiles/core/73/update.sh @@ -0,0 +1,63 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire 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. # +# # +# IPFire 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 IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2013 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +/usr/local/bin/backupctrl exclude >/dev/null 2>&1 + +# +# Remove old core updates from pakfire cache to save space... +core=73 +for (( i=1; i<=$core; i++ )) +do + rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire +done + + +# +#Stop services + + +# +#Extract files +extract_files + + +# +#Start services + +# +#Update Language cache +#perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" + +sync + +# This update need a reboot... +#touch /var/run/need_reboot + +# +#Finish +/etc/init.d/fireinfo start +sendprofile +#Don't report the exitcode last command +exit 0 + diff --git a/config/rootfiles/packages/iptraf-ng b/config/rootfiles/packages/iptraf-ng new file mode 100644 index 000000000..4ad3c863d --- /dev/null +++ b/config/rootfiles/packages/iptraf-ng @@ -0,0 +1,5 @@ +usr/sbin/iptraf-ng +usr/sbin/rvnamed-ng +var/lib/iptraf-ng +var/lock/iptraf-ng +var/log/iptraf-ng diff --git a/config/rootfiles/packages/wavemon b/config/rootfiles/packages/wavemon new file mode 100644 index 000000000..4f0fa3c05 --- /dev/null +++ b/config/rootfiles/packages/wavemon @@ -0,0 +1,10 @@ +usr/bin/wavemon +#usr/share/man/man1/wavemon.1 +#usr/share/man/man5/wavemonrc.5 +#usr/share/wavemon +#usr/share/wavemon/AUTHORS +#usr/share/wavemon/COPYING +#usr/share/wavemon/ChangeLog +#usr/share/wavemon/NEWS +#usr/share/wavemon/README +#usr/share/wavemon/THANKS diff --git a/config/rootfiles/packages/xinetd b/config/rootfiles/packages/xinetd new file mode 100644 index 000000000..4c91ec99c --- /dev/null +++ b/config/rootfiles/packages/xinetd @@ -0,0 +1,11 @@ +etc/rc.d/init.d/xinetd +etc/xinetd.conf +#etc/xinetd.d +#usr/man/man5/xinetd.conf.5 +#usr/man/man8/itox.8 +#usr/man/man8/xconv.pl.8 +#usr/man/man8/xinetd.8 +#usr/man/man8/xinetd.log.8 +#usr/sbin/itox +#usr/sbin/xconv.pl +usr/sbin/xinetd diff --git a/config/xinetd/xinetd.conf b/config/xinetd/xinetd.conf new file mode 100644 index 000000000..b2112a19f --- /dev/null +++ b/config/xinetd/xinetd.conf @@ -0,0 +1,9 @@ +defaults +{ + instances = 10 + log_type = SYSLOG daemon + log_on_success = HOST PID + log_on_failure = HOST + #only_from = +} +includedir /etc/xinetd.d diff --git a/doc/language_issues.es b/doc/language_issues.es index 790ce1acc..88666b618 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -642,6 +642,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -663,6 +664,7 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard @@ -670,6 +672,7 @@ WARNING: untranslated string: tor traffic limit soft WARNING: untranslated string: tor traffic read written WARNING: untranslated string: tor use exit nodes WARNING: untranslated string: uptime load average +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange WARNING: untranslated string: wlan client diff --git a/doc/language_issues.fr b/doc/language_issues.fr index 41d8d9d78..6c963aea4 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -627,6 +627,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -648,6 +649,7 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard @@ -658,6 +660,7 @@ WARNING: untranslated string: upload new ruleset WARNING: untranslated string: uptime load average WARNING: untranslated string: urlfilter file ext block WARNING: untranslated string: urlfilter mode block +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange WARNING: untranslated string: wlan client diff --git a/doc/language_issues.nl b/doc/language_issues.nl index 46838b024..899940424 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -544,6 +544,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -565,6 +566,7 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard @@ -572,6 +574,7 @@ WARNING: untranslated string: tor traffic limit soft WARNING: untranslated string: tor traffic read written WARNING: untranslated string: tor use exit nodes WARNING: untranslated string: uptime load average +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: wlan client WARNING: untranslated string: wlan client advanced settings WARNING: untranslated string: wlan client and diff --git a/doc/language_issues.pl b/doc/language_issues.pl index 790ce1acc..88666b618 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -642,6 +642,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -663,6 +664,7 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard @@ -670,6 +672,7 @@ WARNING: untranslated string: tor traffic limit soft WARNING: untranslated string: tor traffic read written WARNING: untranslated string: tor use exit nodes WARNING: untranslated string: uptime load average +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange WARNING: untranslated string: wlan client diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 670069683..768bc1294 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -607,6 +607,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -628,6 +629,7 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard @@ -635,6 +637,7 @@ WARNING: untranslated string: tor traffic limit soft WARNING: untranslated string: tor traffic read written WARNING: untranslated string: tor use exit nodes WARNING: untranslated string: uptime load average +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange WARNING: untranslated string: wlan client diff --git a/doc/language_issues.tr b/doc/language_issues.tr index 6c4502fd6..af1af7b8c 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -540,6 +540,7 @@ WARNING: untranslated string: tor common settings WARNING: untranslated string: tor configuration WARNING: untranslated string: tor connected relays WARNING: untranslated string: tor contact info +WARNING: untranslated string: tor daemon WARNING: untranslated string: tor enabled WARNING: untranslated string: tor errmsg invalid accounting limit WARNING: untranslated string: tor errmsg invalid ip or mask @@ -561,12 +562,14 @@ WARNING: untranslated string: tor relay mode private bridge WARNING: untranslated string: tor relay mode relay WARNING: untranslated string: tor relay nickname WARNING: untranslated string: tor relay port +WARNING: untranslated string: tor service WARNING: untranslated string: tor socks port WARNING: untranslated string: tor stats WARNING: untranslated string: tor traffic limit hard WARNING: untranslated string: tor traffic limit soft WARNING: untranslated string: tor traffic read written WARNING: untranslated string: tor use exit nodes +WARNING: untranslated string: urlfilter redirect template WARNING: untranslated string: wlan client WARNING: untranslated string: wlan client advanced settings WARNING: untranslated string: wlan client and diff --git a/doc/language_missings b/doc/language_missings index 3c611e617..1550f479e 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -136,6 +136,7 @@ < tor configuration < tor connected relays < tor contact info +< tor daemon < tor enabled < tor errmsg invalid accounting limit < tor errmsg invalid ip or mask @@ -158,6 +159,7 @@ < tor relay mode relay < tor relay nickname < tor relay port +< tor service < tor socks port < tor stats < tor traffic limit hard @@ -171,6 +173,7 @@ < uptime load average < urlfilter file ext block < urlfilter mode block +< urlfilter redirect template < visit us at < vpn keyexchange < wlanap access point @@ -371,6 +374,7 @@ < tor configuration < tor connected relays < tor contact info +< tor daemon < tor enabled < tor errmsg invalid accounting limit < tor errmsg invalid ip or mask @@ -393,6 +397,7 @@ < tor relay mode relay < tor relay nickname < tor relay port +< tor service < tor socks port < tor stats < tor traffic limit hard @@ -403,6 +408,7 @@ < updxlrtr standard view < uptime < uptime load average +< urlfilter redirect template < visit us at < vpn keyexchange < wlanap country @@ -558,6 +564,7 @@ < tor configuration < tor connected relays < tor contact info +< tor daemon < tor enabled < tor errmsg invalid accounting limit < tor errmsg invalid ip or mask @@ -580,6 +587,7 @@ < tor relay mode relay < tor relay nickname < tor relay port +< tor service < tor socks port < tor stats < tor traffic limit hard @@ -590,6 +598,7 @@ < updxlrtr standard view < uptime < uptime load average +< urlfilter redirect template < visit us at < vpn keyexchange < wlanap country @@ -750,6 +759,7 @@ < tor configuration < tor connected relays < tor contact info +< tor daemon < tor enabled < tor errmsg invalid accounting limit < tor errmsg invalid ip or mask @@ -772,6 +782,7 @@ < tor relay mode relay < tor relay nickname < tor relay port +< tor service < tor socks port < tor stats < tor traffic limit hard @@ -782,6 +793,7 @@ < updxlrtr standard view < uptime < uptime load average +< urlfilter redirect template < visit us at < vpn keyexchange < week-graph diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 5e18d3cb5..73e610bfd 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -2195,14 +2195,15 @@ else # m.a.d net2net ### - if ($confighash{$cgiparams{'KEY'}}[3] eq 'net') { - +if ($confighash{$cgiparams{'KEY'}}[3] eq 'net') { my $conffile = glob("${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]/$confighash{$cgiparams{'KEY'}}[1].conf"); - my $certfile = glob("${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1].p12"); - unlink ($certfile) or die "Removing $certfile fail: $!"; - unlink ($conffile) or die "Removing $conffile fail: $!"; - rmdir ("${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") || die "Kann Verzeichnis nicht loeschen: $!"; - + my $certfile = glob("${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1].p12"); + unlink ($certfile); + unlink ($conffile); + + if (-e "${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") { + rmdir ("${General::swroot}/ovpn/n2nconf/$confighash{$cgiparams{'KEY'}}[1]") || die "Kann Verzeichnis nicht loeschen: $!"; + } } unlink ("${General::swroot}/ovpn/certs/$confighash{$cgiparams{'KEY'}}[1]cert.pem"); @@ -3604,35 +3605,33 @@ if ($cgiparams{'TYPE'} eq 'net') { } # Check if a remote host/IP has been set for the client. - if ($cgiparams{'REMOTE'} eq '' && $cgiparams{'SIDE'} ne 'server') { - $errormessage = $Lang::tr{'invalid input for remote host/ip'}; + if ($cgiparams{'TYPE'} eq 'net') { + if ($cgiparams{'SIDE'} ne 'server' && $cgiparams{'REMOTE'} eq '') { + $errormessage = $Lang::tr{'invalid input for remote host/ip'}; - # Check if this is a N2N connection and drop temporary config. - 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 "Removing Directory fail: $!"; - } - goto VPNCONF_ERROR; - } + # Check if this is a N2N connection and drop temporary config. + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; - # Check if a remote host/IP has been configured - the field can be empty on the server side. - if ($cgiparams{'REMOTE'} ne '') { + goto VPNCONF_ERROR; + } - # Check if the given IP is valid - otherwise check if it is a valid domain. - if (! &General::validip($cgiparams{'REMOTE'})) { + # Check if a remote host/IP has been configured - the field can be empty on the server side. + if ($cgiparams{'REMOTE'} ne '') { + # Check if the given IP is valid - otherwise check if it is a valid domain. + if (! &General::validip($cgiparams{'REMOTE'})) { + # Check for a valid domain. + if (! &General::validfqdn ($cgiparams{'REMOTE'})) { + $errormessage = $Lang::tr{'invalid input for remote host/ip'}; - # Check for a valid domain. - if (! &General::validfqdn ($cgiparams{'REMOTE'})) { - $errormessage = $Lang::tr{'invalid input for remote host/ip'}; + # Check if this is a N2N connection and drop temporary config. + unlink ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}/$cgiparams{'NAME'}.conf") or die "Removing Configfile fail: $!"; + rmdir ("${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}") || die "Removing Directory fail: $!"; - # Check if this is a N2N connection and drop temporary config. - 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 "Removing Directory fail: $!"; - } - goto VPNCONF_ERROR; + goto VPNCONF_ERROR; + } + } } - } } if ($cgiparams{'TYPE'} ne 'host') { diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi old mode 100644 new mode 100755 index 2a31dd4bf..b920724de --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -57,9 +57,42 @@ my @accounting_periods = ('daily', 'weekly', 'monthly'); my $TOR_CONTROL_PORT = 9051; +my $string=(); +my $memory=(); +my @memory=(); +my @pid=(); +my @tor=(); +sub daemonstats +{ + $memory = 0; + # for pid and memory + open(FILE, '/usr/local/bin/addonctrl tor status | '); + @tor = ; + close(FILE); + $string = join("", @tor); + $string =~ s/[a-z_]//gi; + $string =~ s/\[[0-1]\;[0-9]+//gi; + $string =~ s/[\(\)\.]//gi; + $string =~ s/ //gi; + $string =~ s///gi; + @pid = split(/\s/,$string); + if (open(FILE, "/proc/$pid[0]/statm")){ + my $temp = ; + @memory = split(/ /,$temp); + close(FILE); + } + $memory+=$memory[0]; +} +daemonstats(); + our %netsettings = (); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); +our %color = (); +our %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + our %settings = (); $settings{'TOR_ENABLED'} = 'off'; @@ -192,12 +225,37 @@ sub showMainBox() { print "
\n"; - &Header::openbox('100%', 'left', $Lang::tr{'tor configuration'}); + &Header::openbox('100%', 'center', $Lang::tr{'tor'}); + + +if ( ($memory != 0) && (@pid[0] ne "///") ){ + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
$Lang::tr{'tor service'}
$Lang::tr{'tor daemon'}$Lang::tr{'running'}
PID$Lang::tr{'memory'}
@pid[0]$memory KB
"; + } else { + print ""; + print ""; + print ""; + print ""; + print "
$Lang::tr{'tor service'}
$Lang::tr{'tor daemon'}$Lang::tr{'stopped'}
"; + } + + &Header::closebox(); + + &Header::openbox('100%', 'center', $Lang::tr{'tor configuration'}); print < + - + @@ -222,12 +280,11 @@ END print < -

-
$Lang::tr{'tor common settings'}$Lang::tr{'tor common settings'}
$Lang::tr{'tor enabled'}:
+
- +
$Lang::tr{'tor acls'}$Lang::tr{'tor acls'}
@@ -244,12 +301,11 @@ END

-

- +
- + @@ -265,7 +321,13 @@ END foreach my $country_name (sort @country_names) { my $country_code = Locale::Country::country2code($country_name); $country_code = uc($country_code); - print "\n"; + print "\n"; } print <
$Lang::tr{'tor exit nodes'}$Lang::tr{'tor exit nodes'}
-

END &Header::closebox(); @@ -305,10 +366,10 @@ END } $selected{'TOR_RELAY_ACCOUNTING_PERIOD'}{$settings{'TOR_RELAY_ACCOUNTING_PERIOD'}} = 'selected'; - &Header::openbox('100%', 'left', $Lang::tr{'tor relay configuration'}); + &Header::openbox('100%', 'center', $Lang::tr{'tor relay configuration'}); print < +
$Lang::tr{'tor relay mode'}: @@ -342,11 +403,11 @@ END
-
+
- +
- + @@ -407,7 +468,7 @@ END &Header::closebox(); print < +
$Lang::tr{'tor bandwidth settings'}$Lang::tr{'tor bandwidth settings'}
$Lang::tr{'tor bandwidth rate'}:
* $Lang::tr{'this field may be blank'} @@ -418,7 +479,7 @@ END
- +
@@ -429,13 +490,13 @@ END # If we have a control connection, show the stats. if ($torctrl) { - &Header::openbox('100%', 'left', $Lang::tr{'tor stats'}); + &Header::openbox('100%', 'center', $Lang::tr{'tor stats'}); my @traffic = &TorTrafficStats($torctrl); if (@traffic) { print < +
 
END if ($settings{'TOR_RELAY_ENABLED'} eq 'on') { @@ -476,7 +537,7 @@ END my $accounting = &TorAccountingStats($torctrl); if ($accounting) { print < +
@@ -527,7 +588,7 @@ END if (@nodes) { my $nodes_length = scalar @nodes; print < +
$Lang::tr{'tor accounting'}
@@ -546,7 +607,11 @@ END END if (exists($node->{'country_code'})) { + if ($node->{'country_code'} eq '??') { + print ""; + } else { print "$node->{"; + } } print </dev/null"); } + # Update pid and memory + daemonstats(); } sub TorConnect() { diff --git a/html/cgi-bin/urlfilter.cgi b/html/cgi-bin/urlfilter.cgi index 1bfc0392c..1b40a3cf0 100644 --- a/html/cgi-bin/urlfilter.cgi +++ b/html/cgi-bin/urlfilter.cgi @@ -59,6 +59,7 @@ my $tcfile = "${General::swroot}/urlfilter/timeconst"; my $uqfile = "${General::swroot}/urlfilter/userquota"; my $dbdir = "${General::swroot}/urlfilter/blacklists"; my $editdir = "${General::swroot}/urlfilter/editor"; +my $templatedir = "/srv/web/ipfire/html/redirect-templates"; my $repository = "/var/urlrepo"; my $hintcolour = '#FFFFCC'; @@ -142,6 +143,7 @@ $filtersettings{'ENABLE_LOG'} = 'off'; $filtersettings{'ENABLE_USERNAME_LOG'} = 'off'; $filtersettings{'ENABLE_CATEGORY_LOG'} = 'off'; $filtersettings{'ENABLE_AUTOUPDATE'} = 'off'; +$filtersettings{'REDIRECT_TEMPLATE'} = 'legacy'; $filtersettings{'ACTION'} = ''; $filtersettings{'VALID'} = ''; @@ -1074,6 +1076,8 @@ foreach $category (@filtergroups) { $checked{$category}{$filtersettings{$category}} = "checked='checked'"; } +$selected{'REDIRECT_TEMPLATE'}{$filtersettings{'REDIRECT_TEMPLATE'}} = "selected='selected'"; + $selected{'DEFINITION'}{$tcsettings{'DEFINITION'}} = "selected='selected'"; $selected{'FROM_HOUR'}{$tcsettings{'FROM_HOUR'}} = "selected='selected'"; $selected{'FROM_MINUTE'}{$tcsettings{'FROM_MINUTE'}} = "selected='selected'"; @@ -1415,6 +1419,24 @@ print < + + + + diff --git a/html/html/redirect-templates/legacy/template.html b/html/html/redirect-templates/legacy/template.html new file mode 100644 index 000000000..b5fb61ebe --- /dev/null +++ b/html/html/redirect-templates/legacy/template.html @@ -0,0 +1,55 @@ + + + + + ACCESS MESSAGE + + +
$Lang::tr{'tor connected relays'} ($nodes_length)$Lang::tr{'urlfilter block settings'}
$Lang::tr{'urlfilter redirect template'} +
$Lang::tr{'urlfilter show category'}:
+ + + + + +
/images/background.gif"> +
+ + + + + + + +
+ + [] + + + +
+ + + + + +

URL: "> + + + +

Client IP address: + + +

+ + +

+ + Web Filtering by + + + IPFire + + +
+ + diff --git a/html/html/redirect.cgi b/html/html/redirect.cgi index 93f1ea4a9..4f9d2278e 100644 --- a/html/html/redirect.cgi +++ b/html/html/redirect.cgi @@ -19,9 +19,12 @@ # # ############################################################################### -use CGI qw(param); +use CGI; +use HTML::Entities; +use HTML::Template; -$swroot="/var/ipfire"; +my $swroot="/var/ipfire"; +my $templateroot = "/srv/web/ipfire/html/redirect-templates"; my %netsettings; my %filtersettings; @@ -29,117 +32,75 @@ my %filtersettings; &readhash("$swroot/ethernet/settings", \%netsettings); &readhash("$swroot/urlfilter/settings", \%filtersettings); -$category=param("category"); -$url=param("url"); -$ip=param("ip"); +# Read the template file. +my $template = $filtersettings{'REDIRECT_TEMPLATE'}; +if (($template eq '') || (! -e "$templateroot/$template")) { + $template = "legacy"; +} +my $tmpl = HTML::Template->new( + filename => "$templateroot/$template/template.html", + die_on_bad_params => 0 +); + +# Address where to load more resources from. +$tmpl->param(ADDRESS => "http://$netsettings{'GREEN_ADDRESS'}:81"); -if ($filtersettings{'MSG_TEXT_1'} eq '') { +# Message text 1 +my $msgtext1 = $filtersettings{'MSG_TEXT_1'}; +if ($msgtext1 eq '') { $msgtext1 = "A C C E S S    D E N I E D"; -} else { $msgtext1 = $filtersettings{'MSG_TEXT_1'}; } -if ($filtersettings{'MSG_TEXT_2'} eq '') { +} +$tmpl->param(MSG_TEXT_1 => $msgtext1); + +# Message text 2 +my $msgtext2 = $filtersettings{'MSG_TEXT_2'}; +if ($msgtext2 eq '') { $msgtext2 = "Access to the requested page has been denied"; -} else { $msgtext2 = $filtersettings{'MSG_TEXT_2'}; } -if ($filtersettings{'MSG_TEXT_3'} eq '') { +} +$tmpl->param(MSG_TEXT_2 => $msgtext2); + +# Message text 3 +my $msgtext3 = $filtersettings{'MSG_TEXT_3'}; +if ($msgtext3 eq '') { $msgtext3 = "Please contact the Network Administrator if you think there has been an error"; -} else { $msgtext3 = $filtersettings{'MSG_TEXT_3'}; } +} +$tmpl->param(MSG_TEXT_3 => $msgtext3); + +# Category +my $category = CGI::param("category"); +$tmpl->param(CATEGORY => &escape($category)); + +# URL +my $url = CGI::param("url"); +$tmpl->param(URL => &escape($url)); -if ($category eq '') { $category = ' '; } else { $category = '['.$category.']'; } +# IP address +my $ip_address = CGI::param("ip"); +$tmpl->param(IP_ADDRESS => &escape($ip_address)); +# Print header print "Pragma: no-cache\n"; print "Cache-control: no-cache\n"; print "Connection: close\n"; print "Content-type: text/html\n\n"; +print $tmpl->output; -print < - - - -ACCESS MESSAGE - - - - - - -
-
- $msgtext1 - - -END -; - -if (!($category eq "")) -{ - print < - - $category - -END -; +sub escape($) { + my $s = shift; + return HTML::Entities::encode_entities($s); } -print < - - - $msgtext2 - - -END -; - -if (!($url eq "")) -{ -print <URL: $url -END -; -} - -if (!($ip eq "")) -{ -print <Client IP address: $ip -END -; -} - -print <

$msgtext3 - -

- Web Filtering by - - - IPFire - - -
- - - -END -; - -sub readhash -{ +sub readhash { my $filename = $_[0]; my $hash = $_[1]; my ($var, $val); - if (-e $filename) - { + if (-e $filename) { open(FILE, $filename) or die "Unable to read file $filename"; - while () - { + while () { chop; ($var, $val) = split /=/, $_, 2; - if ($var) - { + if ($var) { $val =~ s/^\'//g; $val =~ s/\'$//g; @@ -149,6 +110,7 @@ sub readhash $hash->{$var} = $val; } } + close FILE; } } diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index a0c426f3f..4e005e1a8 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1817,6 +1817,7 @@ 'tor configuration' => 'Tor-Konfiguration', 'tor connected relays' => 'Verbundene Relays', 'tor contact info' => 'Kontaktinformationen', +'tor daemon' => 'Daemon', 'tor enabled' => 'Tor einschalten', 'tor errmsg invalid accounting limit' => 'Ungültiges Accounting-Limit', 'tor errmsg invalid ip or mask' => 'Ungültiges IP-Subnetz', @@ -1839,6 +1840,7 @@ 'tor relay mode relay' => 'Nur Relay', 'tor relay nickname' => 'Relay-Nickname', 'tor relay port' => 'Relay-Port', +'tor service' => 'Tor-Service', 'tor socks port' => 'SOCKS-Port', 'tor stats' => 'Statistiken', 'tor traffic limit hard' => 'Das Übertragungslimit wurde erreicht.', @@ -2116,6 +2118,7 @@ 'urlfilter quota restart message' => 'Hinweis: Beim Neustart des URL-Filters werden die Zähler für alle Benutzer zurückgesetzt', 'urlfilter quota time error' => 'Ungültiger Wert für Zeitkontingent', 'urlfilter quota user error' => 'Mindestens ein Benutzername erforderlich', +'urlfilter redirect template' => 'Sperrseitenvorlage', 'urlfilter redirectpage' => 'Leite zu dieser URL um', 'urlfilter remove file' => 'Datei aus der Ablage entfernen', 'urlfilter renewal' => 'Erneuerung', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index b12ae7d2e..ba80985a8 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -897,7 +897,7 @@ 'firewall log' => 'Firewall log', 'firewall log viewer' => 'Firewall Log Viewer', 'firewall logs' => 'Firewall Logs', -'firewall logs ip' => 'Fw-Logdgraphs (IP)', +'firewall logs ip' => 'Fw-Loggraphs (IP)', 'firewall logs port' => 'Fw-Loggraphs (Port)', 'firewallhits' => 'firewallhits', 'firmware' => 'Firmware', @@ -1852,6 +1852,7 @@ 'tor configuration' => 'Tor Configuration', 'tor connected relays' => 'Connected relays', 'tor contact info' => 'Contact Info', +'tor daemon' => 'Daemon', 'tor enabled' => 'Enable Tor', 'tor errmsg invalid accounting limit' => 'Invalid accounting limit', 'tor errmsg invalid ip or mask' => 'Invalid IP subnet', @@ -1875,6 +1876,7 @@ 'tor relay mode relay' => 'Relay only', 'tor relay nickname' => 'Relay nickname', 'tor relay port' => 'Relay port', +'tor service' => 'Tor Service', 'tor socks port' => 'SOCKS port', 'tor stats' => 'Statistics', 'tor traffic limit hard' => 'Traffic limit has been reached.', @@ -2154,6 +2156,7 @@ 'urlfilter quota restart message' => 'Note: The counters will be reset for all users when restarting the URL filter', 'urlfilter quota time error' => 'Invalid value for time quota', 'urlfilter quota user error' => 'At least one username is required', +'urlfilter redirect template' => 'Redirect page template', 'urlfilter redirectpage' => 'Redirect to this URL', 'urlfilter remove file' => 'Remove file from repository', 'urlfilter renewal' => 'Renewal', diff --git a/lfs/HTML-Template b/lfs/HTML-Template new file mode 100644 index 000000000..fb837ba52 --- /dev/null +++ b/lfs/HTML-Template @@ -0,0 +1,78 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# 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 . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.94 + +THISAPP = HTML-Template-$(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 = 7b7683c3672d55fb922734ea1e9ba7e8 + +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) && perl Makefile.PL + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) + diff --git a/lfs/iptraf-ng b/lfs/iptraf-ng new file mode 100644 index 000000000..d0491730f --- /dev/null +++ b/lfs/iptraf-ng @@ -0,0 +1,87 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.1.4 + +THISAPP = iptraf-ng-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = iptraf-ng +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = de27cfeeede96e2acfb0edc8439b034a + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# 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 xzf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure \ + --prefix=/usr + + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + + # Binary install + cd $(DIR_APP) && install -v -m750 -D iptraf-ng /usr/sbin/iptraf-ng + cd $(DIR_APP) && install -v -m750 -D rvnamed-ng /usr/sbin/rvnamed-ng + + # Directory install + -mkdir -vp /var/log/iptraf-ng + chmod 750 /var/log/iptraf-ng + chown root.root /var/log/iptraf-ng + -mkdir -vp /var/lib/iptraf-ng + chmod 750 /var/lib/iptraf-ng + chown root.root /var/lib/iptraf-ng + -mkdir -vp /var/lock/iptraf-ng + chmod 755 /var/lock/iptraf-ng + chown root.root /var/lock/iptraf-ng + + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/samba b/lfs/samba index b5980087f..0171627a4 100644 --- a/lfs/samba +++ b/lfs/samba @@ -24,7 +24,7 @@ include Config -VER = 3.6.17 +VER = 3.6.18 THISAPP = samba-$(VER) DL_FILE = $(THISAPP).tar.gz @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = samba -PAK_VER = 51 +PAK_VER = 52 DEPS = "cups" @@ -44,7 +44,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = c67c3330545c8f1f7ee26e017c28439b +$(DL_FILE)_MD5 = c7eec3e83fe4c4750240a8a0a214bbd4 install : $(TARGET) diff --git a/lfs/tor b/lfs/tor index 8bce4be8f..ae63d961a 100644 --- a/lfs/tor +++ b/lfs/tor @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = tor -PAK_VER = 1 +PAK_VER = 2 DEPS = "libevent2" @@ -107,6 +107,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) install -v -m 644 $(DIR_SRC)/config/tor/defaults-torrc \ /usr/share/tor/defaults-torrc + # Install start links and backup include file. + ln -sf ../init.d/tor /etc/rc.d/rc3.d/S60tor + ln -sf ../init.d/tor /etc/rc.d/rc0.d/K40tor + ln -sf ../init.d/tor /etc/rc.d/rc6.d/K40tor install -v -m 644 $(DIR_SRC)/config/backup/includes/tor \ /var/ipfire/backup/addons/includes/tor @rm -rf $(DIR_APP) diff --git a/lfs/wavemon b/lfs/wavemon new file mode 100644 index 000000000..a3df36ec6 --- /dev/null +++ b/lfs/wavemon @@ -0,0 +1,71 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 0.7.5 + +THISAPP = wavemon-$(VER) +DL_FILE = $(THISAPP).tar.bz2 +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = wavemon +PAK_VER = 1 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 77d4a0f099ca98cf98a915adc70694ba + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# 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 axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && ./configure \ + --prefix=/usr + + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/lfs/xinetd b/lfs/xinetd new file mode 100644 index 000000000..62f34eabb --- /dev/null +++ b/lfs/xinetd @@ -0,0 +1,85 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# 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 . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 2.3.15 + +THISAPP = xinetd-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = xinetd +PAK_VER = 1 + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 77358478fd58efa6366accae99b8b04c + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# 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 + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + -mkdir -pv /etc/xinetd.d + cp -f $(DIR_SRC)/config/xinetd/xinetd.conf /etc/xinetd.conf + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index eb9421ca5..814b14a8b 100755 --- a/make.sh +++ b/make.sh @@ -25,7 +25,7 @@ NAME="IPFire" # Software name SNAME="ipfire" # Short name VERSION="2.13" # Version number -CORE="72" # Core Level (Filename) +CORE="73" # Core Level (Filename) PAKFIRE_CORE="72" # Core Level (PAKFIRE) GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch SLOGAN="www.ipfire.org" # Software slogan @@ -529,6 +529,7 @@ buildipfire() { ipfiremake URI ipfiremake HTML-Tagset ipfiremake HTML-Parser + ipfiremake HTML-Template ipfiremake Compress-Zlib ipfiremake Digest ipfiremake Digest-SHA1 @@ -752,6 +753,7 @@ buildipfire() { ipfiremake acpid ipfiremake fping ipfiremake telnet + ipfiremake xinetd ipfiremake libgpg-error ipfiremake libassuan ipfiremake gpgme @@ -782,6 +784,8 @@ buildipfire() { ipfiremake swatch ipfiremake tor ipfiremake arm + ipfiremake wavemon + ipfiremake iptraf-ng echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild echo >> $BASEDIR/build/var/ipfire/firebuild diff --git a/src/initscripts/init.d/tor b/src/initscripts/init.d/tor index e27241f56..4fef577ac 100644 --- a/src/initscripts/init.d/tor +++ b/src/initscripts/init.d/tor @@ -9,6 +9,10 @@ . /etc/sysconfig/rc . ${rc_functions} +function tor_is_enabled() { + [ "${TOR_ENABLED}" = "on" ] || [ "${TOR_RELAY_ENABLED}" = "on" ] +} + function setup_firewall() { eval $(/usr/local/bin/readhash /var/ipfire/tor/settings) @@ -27,6 +31,8 @@ function flush_firewall() { case "${1}" in start) + tor_is_enabled || exit 0 + # Setup firewall. setup_firewall diff --git a/src/paks/xinetd/install.sh b/src/paks/xinetd/install.sh new file mode 100644 index 000000000..347fd368c --- /dev/null +++ b/src/paks/xinetd/install.sh @@ -0,0 +1,34 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire 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 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire 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 IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +restore_backup ${NAME} + +mkdir /etc/xinetd.d + +start_service --background ${NAME} + +ln -sf ../init.d/${NAME} /etc/rc.d/rc0.d/K30xinetd +ln -sf ../init.d/${NAME} /etc/rc.d/rc3.d/S30xinetd +ln -sf ../init.d/${NAME} /etc/rc.d/rc6.d/K30xinetd diff --git a/src/paks/xinetd/uninstall.sh b/src/paks/xinetd/uninstall.sh new file mode 100644 index 000000000..a7b8a5370 --- /dev/null +++ b/src/paks/xinetd/uninstall.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire 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 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire 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 IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME} +make_backup ${NAME} +remove_files diff --git a/src/paks/xinetd/update.sh b/src/paks/xinetd/update.sh new file mode 100644 index 000000000..89c40d0d7 --- /dev/null +++ b/src/paks/xinetd/update.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire 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 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire 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 IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh