Merge remote-tracking branch 'ms/xss' into next
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Aug 2013 15:40:44 +0000 (17:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Aug 2013 15:40:44 +0000 (17:40 +0200)
36 files changed:
config/cfgroot/useragents
config/rootfiles/common/HTML-Template [new file with mode: 0644]
config/rootfiles/core/73/exclude [new file with mode: 0644]
config/rootfiles/core/73/filelists/HTML-Template [new symlink]
config/rootfiles/core/73/filelists/files [new file with mode: 0644]
config/rootfiles/core/73/meta [new file with mode: 0644]
config/rootfiles/core/73/update.sh [new file with mode: 0644]
config/rootfiles/packages/iptraf-ng [new file with mode: 0644]
config/rootfiles/packages/wavemon [new file with mode: 0644]
config/rootfiles/packages/xinetd [new file with mode: 0644]
config/xinetd/xinetd.conf [new file with mode: 0644]
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/ovpnmain.cgi
html/cgi-bin/tor.cgi [changed mode: 0644->0755]
html/cgi-bin/urlfilter.cgi
html/html/redirect-templates/legacy/template.html [new file with mode: 0644]
html/html/redirect.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/HTML-Template [new file with mode: 0644]
lfs/iptraf-ng [new file with mode: 0644]
lfs/samba
lfs/tor
lfs/wavemon [new file with mode: 0644]
lfs/xinetd [new file with mode: 0644]
make.sh
src/initscripts/init.d/tor
src/paks/xinetd/install.sh [new file with mode: 0644]
src/paks/xinetd/uninstall.sh [new file with mode: 0644]
src/paks/xinetd/update.sh [new file with mode: 0644]

index 5fe3446c6176ade7b7bda41f5cc79b810623aaf8..d5164fd63545c3c06d1cbb69c49d57674d0f1bb3 100644 (file)
@@ -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 (file)
index 0000000..4b486d9
--- /dev/null
@@ -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 (file)
index 0000000..321a931
--- /dev/null
@@ -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 (symlink)
index 0000000..f17c1da
--- /dev/null
@@ -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 (file)
index 0000000..6a58766
--- /dev/null
@@ -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 (file)
index 0000000..d547fa8
--- /dev/null
@@ -0,0 +1 @@
+DEPS=""
diff --git a/config/rootfiles/core/73/update.sh b/config/rootfiles/core/73/update.sh
new file mode 100644 (file)
index 0000000..446e8a0
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /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 (file)
index 0000000..4ad3c86
--- /dev/null
@@ -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 (file)
index 0000000..4f0fa3c
--- /dev/null
@@ -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 (file)
index 0000000..4c91ec9
--- /dev/null
@@ -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 (file)
index 0000000..b2112a1
--- /dev/null
@@ -0,0 +1,9 @@
+defaults
+{
+   instances      = 10
+   log_type       = SYSLOG daemon
+   log_on_success = HOST PID
+   log_on_failure = HOST
+   #only_from      = <your local networks>
+}
+includedir /etc/xinetd.d
index 790ce1acc26a7506eab37850f61c00dd49c7c71c..88666b6181e63ae97f46916004c70cf21c1be201 100644 (file)
@@ -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
index 41d8d9d7895854d614300c7bae6cc965f259c0c6..6c963aea4ce6fe0ab561fa08adbb0ef85238eff2 100644 (file)
@@ -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
index 46838b024a12b8083ad6dd5711b8b24f42b71bce..899940424145dbcbd220c7ace0acd780b7923ff1 100644 (file)
@@ -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
index 790ce1acc26a7506eab37850f61c00dd49c7c71c..88666b6181e63ae97f46916004c70cf21c1be201 100644 (file)
@@ -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
index 67006968301e4d59bea4db238ce1b74b554e9c63..768bc1294828cb78646d61e15c62680466a5dd5f 100644 (file)
@@ -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
index 6c4502fd6296bccfb8ddc41dea512063cd3f23fb..af1af7b8cbb34ce38e54b3c7b774242ca26bb46e 100644 (file)
@@ -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
index 3c611e617eab5128ee3ede471becfab03ee3c8ba..1550f479e68e8ec2a2a35a9a959f632f0a968755 100644 (file)
 < tor configuration
 < tor connected relays
 < tor contact info
+< tor daemon
 < tor enabled
 < tor errmsg invalid accounting limit
 < tor errmsg invalid ip or mask
 < tor relay mode relay
 < tor relay nickname
 < tor relay port
+< tor service
 < tor socks port
 < tor stats
 < tor traffic limit hard
 < uptime load average
 < urlfilter file ext block
 < urlfilter mode block
+< urlfilter redirect template
 < visit us at
 < vpn keyexchange
 < wlanap access point
 < tor configuration
 < tor connected relays
 < tor contact info
+< tor daemon
 < tor enabled
 < tor errmsg invalid accounting limit
 < tor errmsg invalid ip or mask
 < tor relay mode relay
 < tor relay nickname
 < tor relay port
+< tor service
 < tor socks port
 < tor stats
 < tor traffic limit hard
 < updxlrtr standard view
 < uptime
 < uptime load average
+< urlfilter redirect template
 < visit us at
 < vpn keyexchange
 < wlanap country
 < tor configuration
 < tor connected relays
 < tor contact info
+< tor daemon
 < tor enabled
 < tor errmsg invalid accounting limit
 < tor errmsg invalid ip or mask
 < tor relay mode relay
 < tor relay nickname
 < tor relay port
+< tor service
 < tor socks port
 < tor stats
 < tor traffic limit hard
 < updxlrtr standard view
 < uptime
 < uptime load average
+< urlfilter redirect template
 < visit us at
 < vpn keyexchange
 < wlanap country
 < tor configuration
 < tor connected relays
 < tor contact info
+< tor daemon
 < tor enabled
 < tor errmsg invalid accounting limit
 < tor errmsg invalid ip or mask
 < tor relay mode relay
 < tor relay nickname
 < tor relay port
+< tor service
 < tor socks port
 < tor stats
 < tor traffic limit hard
 < updxlrtr standard view
 < uptime
 < uptime load average
+< urlfilter redirect template
 < visit us at
 < vpn keyexchange
 < week-graph
index 5e18d3cb53bf1a01e15565d7a78d50845185f2b0..73e610bfdfeaa82783403252cd8d4723dc602290 100644 (file)
@@ -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') {
old mode 100644 (file)
new mode 100755 (executable)
index 2a31dd4..b920724
@@ -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 = <FILE>;
+       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/\e//gi;
+       @pid = split(/\s/,$string);
+       if (open(FILE, "/proc/$pid[0]/statm")){
+               my $temp = <FILE>;
+               @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 "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
 
-       &Header::openbox('100%', 'left', $Lang::tr{'tor configuration'});
+       &Header::openbox('100%', 'center', $Lang::tr{'tor'});
+
+
+if ( ($memory != 0) && (@pid[0] ne "///") ){
+               print "<table width='95%' cellspacing='0'>";
+               print "<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></td></tr>";
+               print "<tr><td class='base'>$Lang::tr{'tor daemon'}</td>";
+               print "<td align='center' colspan='2' width='75%' bgcolor='${Header::colourgreen}'><font color='white'><strong>$Lang::tr{'running'}</strong></font></td></tr>";
+               print "<tr><td class='base'></td>";
+               print "<td bgcolor='$color{'color20'}' align='center'><strong>PID</strong></td>";
+               print "<td bgcolor='$color{'color20'}' align='center'><strong>$Lang::tr{'memory'}</strong></td></tr>";
+               print "<tr><td class='base'></td>";
+               print "<td bgcolor='$color{'color22'}' align='center'>@pid[0]</td>";
+               print "<td bgcolor='$color{'color22'}' align='center'>$memory KB</td></tr>";
+               print "</table>";
+       } else {
+               print "<table width='95%' cellspacing='0'>";
+               print "<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><strong>$Lang::tr{'tor service'}</strong></td></tr>";
+               print "<tr><td class='base'>$Lang::tr{'tor daemon'}</td>";
+               print "<td align='center' width='75%' bgcolor='${Header::colourred}'><font color='white'><strong>$Lang::tr{'stopped'}</strong></font></td></tr>";
+               print "</table>";
+       }
+
+       &Header::closebox();
+
+       &Header::openbox('100%', 'center', $Lang::tr{'tor configuration'});
 
        print <<END;
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
-                               <td colspan='4' class='base'><b>$Lang::tr{'tor common settings'}</b></td>
+                               <td colspan='4' class='base' bgcolor='$color{'color20'}'><b>$Lang::tr{'tor common settings'}</b></td>
                        </tr>
                        <tr>
                                <td width='25%' class='base'>$Lang::tr{'tor enabled'}:</td>
@@ -222,12 +280,11 @@ END
 
        print <<END;
                <br>
-               <hr size='1'>
                <br>
 
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
-                               <td colspan='4' class='base'><b>$Lang::tr{'tor acls'}</b></td>
+                               <td colspan='4' class='base' bgcolor='$color{'color20'}'><b>$Lang::tr{'tor acls'}</b></td>
                        </tr>
                        <tr>
                                <td colspan='2' class='base' width='55%'>
@@ -244,12 +301,11 @@ END
                </table>
 
                <br>
-               <hr size='1'>
                <br>
 
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
-                               <td colspan='4' class='base'><b>$Lang::tr{'tor exit nodes'}</b></td>
+                               <td colspan='4' class='base' bgcolor='$color{'color20'}'><b>$Lang::tr{'tor exit nodes'}</b></td>
                        </tr>
                        <tr>
                                <td colspan='2' class='base' width='55%'></td>
@@ -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 "<option value='$country_code'>$country_name ($country_code)</option>\n";
+                       print "<option value='$country_code'";
+
+                       if ($settings{'TOR_EXIT_COUNTRY'} eq $country_code) {
+                               print " selected";
+                       }
+
+                       print ">$country_name ($country_code)</option>\n";
                }
 
        print <<END;
@@ -276,7 +338,6 @@ END
                                </td>
                        </tr>
                </table>
-               <br><br>
 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 <<END;
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
                                <td width='25%' class='base'>$Lang::tr{'tor relay mode'}:</td>
                                <td width='30%'>
@@ -342,11 +403,11 @@ END
                        </tr>
                </table>
 
-               <hr size='1'>
+               <br>
 
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
-                               <td colspan='4' class='base'><b>$Lang::tr{'tor bandwidth settings'}</b></td>
+                               <td colspan='4' class='base' bgcolor='$color{'color20'}'><b>$Lang::tr{'tor bandwidth settings'}</b></td>
                        </tr>
                        <tr>
                                <td width='25%' class='base'>$Lang::tr{'tor bandwidth rate'}:</td>
@@ -407,7 +468,7 @@ END
        &Header::closebox();
 
        print <<END;
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
                                <td>
                                        <img src='/blob.gif' align='top' alt='*' />&nbsp;<font class='base'>$Lang::tr{'this field may be blank'}</font>
@@ -418,7 +479,7 @@ END
 
                <hr>
 
-               <table width='100%'>
+               <table width='95%'>
                        <tr>
                                <td>&nbsp;</td>
                                <td align='center'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
@@ -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;
-                               <table width='100%'>
+                               <table width='95%'>
 END
 
                if ($settings{'TOR_RELAY_ENABLED'} eq 'on') {
@@ -476,7 +537,7 @@ END
                my $accounting = &TorAccountingStats($torctrl);
                if ($accounting) {
                        print <<END;
-                               <table width='100%'>
+                               <table width='95%'>
                                        <tr>
                                                <td colspan='2' class='base'><b>$Lang::tr{'tor accounting'}</b></td>
                                        </tr>
@@ -527,7 +588,7 @@ END
                if (@nodes) {
                        my $nodes_length = scalar @nodes;
                        print <<END;
-                               <table width='100%'>
+                               <table width='95%'>
                                        <tr>
                                                <td width='40%' class='base'><b>$Lang::tr{'tor connected relays'}</b></td>
                                                <td width='60%' colspan='2'>($nodes_length)</td>
@@ -546,7 +607,11 @@ END
 END
 
                                if (exists($node->{'country_code'})) {
+                                       if ($node->{'country_code'} eq '??') {
+                                               print "<img src='/images/flags/blank.png' border='0' align='absmiddle'/>";
+                                       } else {
                                                print "<a href='country.cgi#$node->{'country_code'}'><img src='/images/flags/$node->{'country_code'}.png' border='0' align='absmiddle' alt='$node->{'country_code'}'></a>";
+                                       }
                                }
 
                                print <<END;
@@ -689,6 +754,8 @@ sub BuildConfiguration() {
        } else {
                system("/usr/local/bin/torctrl stop &>/dev/null");
        }
+       # Update pid and memory
+       daemonstats();
 }
 
 sub TorConnect() {
index 1bfc0392cd6c788cf5115f48d99538c9dded0170..1b40a3cf036171f84ad533de036af3cd1a2e54ff 100644 (file)
@@ -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 <<END
 <tr>
         <td colspan='4'><b>$Lang::tr{'urlfilter block settings'}</b></td>
 </tr>
+<tr>
+       <td width='25%' class='base'>$Lang::tr{'urlfilter redirect template'}</td>
+       <td width='75%' colspan='2'>
+               <select name='REDIRECT_TEMPLATE'>
+END
+;
+
+       foreach (<$templatedir/*>) {
+               if ((-d "$_") && (-e "$_/template.html")) {
+                       my $template = substr($_,rindex($_,"/")+1);
+                       print "<option value='$template' $selected{'REDIRECT_TEMPLATE'}{$template}>$template</option>\n";
+               }
+       }
+
+print <<END
+               </select>
+       </td>
+</tr>
 <tr>
        <td width='25%' class='base'>$Lang::tr{'urlfilter show category'}:</td>
        <td width='12%'><input type='checkbox' name='SHOW_CATEGORY' $checked{'SHOW_CATEGORY'}{'on'} /></td>
diff --git a/html/html/redirect-templates/legacy/template.html b/html/html/redirect-templates/legacy/template.html
new file mode 100644 (file)
index 0000000..b5fb61e
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+       <head>
+               <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
+               <title>ACCESS MESSAGE</title>
+       </head>
+       <body>
+               <table width="100%" height='100%' border="0">
+                       <tr>
+                               <td colspan='3' width='100%' height='130' align="center" background="<TMPL_VAR NAME="ADDRESS">/images/background.gif">
+                       <tr>
+                               <td width='10%'>
+                               <td align='center' bgcolor='#CC000000' width='80%'>
+                                       <font face="verdana, arial, sans serif" color="#FFFFFF" size="5">
+                                               <b><TMPL_VAR NAME="MSG_TEXT_1"></b>
+                                       </font>
+                               <td width='10%'>
+
+                       <TMPL_IF NAME="CATEGORY">
+                               <tr>
+                                       <td colspan='3' align='center'>
+                                               <font face="verdana, arial, sans serif" color="#CC000000" size="1">
+                                                       <b>[<TMPL_VAR NAME="CATEGORY">]</b>
+                                               </font>
+                       </TMPL_IF>
+
+                       <tr>
+                               <td colspan='3' align="center">
+                                       <font face="verdana, arial, sans serif" color="#000000" size="4">
+                                               <b><TMPL_VAR NAME="MSG_TEXT_2"></b>
+                                       </font>
+                                       <font face="verdana,arial,sans serif" color="#000000" size="2">
+                                               <TMPL_IF NAME="URL">
+                                                       <p>URL: <a href="<TMPL_VAR NAME="URL">"><TMPL_VAR NAME="URL"></a>
+                                               </TMPL_IF>
+
+                                               <TMPL_IF NAME="IP_ADDRESS">
+                                                       <p>Client IP address: <i><TMPL_VAR NAME="IP_ADDRESS"></i>
+                                               </TMPL_IF>
+
+                                               <br><p><TMPL_VAR NAME="MSG_TEXT_3">
+                                       </font>
+
+                       <tr>
+                               <td colspan='3' height='60%' valign="bottom" align="right">
+                                       <font face="verdana,arial,sans serif" color="#656565" size="1">
+                                               Web Filtering by
+                                       </font>
+                                       <a href="http://www.ipfire.org" target="_blank">
+                                               <font face="verdana,arial,sans serif" color="#656565" size="1"><b>IPFire</b></font>
+                                       </a>
+
+               </table>
+       </body>
+</html>
index 93f1ea4a96aece6bdc9064120b614ab086f49ee6..4f9d2278e2ba5e3ce99dd28df1848b683c766b7d 100644 (file)
 #                                                                             #
 ###############################################################################
 
-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 &nbsp;&nbsp; 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 = '&nbsp;'; } 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 <<END
-
-<html>
-<head>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
-<title>ACCESS MESSAGE</title>
-</head>
-
-<body>
-<table width="100%" height='100%' border="0">
-<tr>
-               <td colspan='3' width='100%' height='130' align="center" background="http://$netsettings{'GREEN_ADDRESS'}:81/images/background.gif">
-<tr>           <td width='10%'><td align='center' bgcolor='#CC000000' width='80%'><font face="verdana, arial, sans serif" color="#FFFFFF" size="5">
-                                       <b>$msgtext1</b>
-                                       </font>
-               <td width='10%'>
-END
-;
-
-if (!($category eq ""))
-{
-       print <<END
-       <tr>            <td colspan='3' align='center'>
-                               <font face="verdana, arial, sans serif" color="#CC000000" size="1">
-                                       <b>$category</b>
-                               </font>
-END
-;
+sub escape($) {
+       my $s = shift;
+       return HTML::Entities::encode_entities($s);
 }
-print <<END
-<tr>
-                       <td colspan='3' align="center">
-                               <font face="verdana, arial, sans serif" color="#000000" size="4">
-                               <b>$msgtext2</b>
-                               </font>
-                               <font face="verdana,arial,sans serif" color="#000000" size="2">
-END
-;
-
-if (!($url eq ""))
-{
-print <<END
-                                       <p>URL: <a href="$url">$url</a>
-END
-;
-}
-
-if (!($ip eq ""))
-{
-print <<END
-                                       <p>Client IP address: <i>$ip</i>
-END
-;
-}
-
-print <<END
-                                       <br><p>$msgtext3
-                                       </font>
 
-<tr>
-       <td colspan='3' height='60%' valign="bottom" align="right">
-               <font face="verdana,arial,sans serif" color="#656565" size="1">Web Filtering by
-               </font>
-               <a href="http://www.ipfire.org" target="_blank"><b>
-               <font face="verdana,arial,sans serif" color="#656565" size="1">IPFire</b></a>
-               </font>
-
-</table>
-</body>
-
-</html>
-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 (<FILE>)
-               {
+               while (<FILE>) {
                        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;
        }
 }
index a0c426f3fb1eb985ef0f531472c38011e610a2df..4e005e1a88de39d1dca56d00a8180b191d44a2d0 100644 (file)
 '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',
 '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.',
 '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',
index b12ae7d2ec367453c827e54a288f2e9eecea0996..ba80985a8ef58c91aea30a1282d5db32e5e54f1a 100644 (file)
 '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',
 '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',
 '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.',
 '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 (file)
index 0000000..fb837ba
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# 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 (file)
index 0000000..d049173
--- /dev/null
@@ -0,0 +1,87 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+###############################################################################
+# 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)
index b5980087f485760c81c9a59b57e49fdd2ba4c259..0171627a4ac1fd50216395678845e1e2d64c4925 100644 (file)
--- 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 8bce4be8f1541692cf9d44646e4641406de48b2b..ae63d961a376c387cece335e62915d1006fcc1b1 100644 (file)
--- 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 (file)
index 0000000..a3df36e
--- /dev/null
@@ -0,0 +1,71 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+###############################################################################
+# 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 (file)
index 0000000..62f34ea
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# 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 eb9421ca5e00fbbfcb2f87f3cdb109093adc3b74..814b14a8bad9ddb6652df0e93db6c4d0424a1dc8 100755 (executable)
--- 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
index e27241f5617e93b53d68ce760df57ccf0d9ea034..4fef577ac7fb2aee0118f0dad1b4643898c65061 100644 (file)
@@ -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 (file)
index 0000000..347fd36
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /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 (file)
index 0000000..a7b8a53
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /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 (file)
index 0000000..89c40d0
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh