]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Merge branch 'ovpn-header-on-index.cgi' into core67-merge
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 3 Mar 2013 12:58:23 +0000 (13:58 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 3 Mar 2013 12:58:23 +0000 (13:58 +0100)
config/rootfiles/common/IO-Socket-SSL [new file with mode: 0644]
config/rootfiles/packages/sendEmail [new file with mode: 0644]
config/updxlrator/updxlrator
html/cgi-bin/ovpnmain.cgi
html/cgi-bin/updatexlrator.cgi
html/html/images/updbooster/updxl-src-microsoft.gif [new file with mode: 0644]
html/html/images/updbooster/updxl-src-windows.gif
lfs/IO-Socket-SSL [new file with mode: 0644]
lfs/sendEmail [new file with mode: 0644]
make.sh
src/initscripts/init.d/firewall

diff --git a/config/rootfiles/common/IO-Socket-SSL b/config/rootfiles/common/IO-Socket-SSL
new file mode 100644 (file)
index 0000000..09b9f31
--- /dev/null
@@ -0,0 +1,6 @@
+usr/lib/perl5/site_perl/5.12.3/IO/Socket
+usr/lib/perl5/site_perl/5.12.3/IO/Socket/SSL.pm
+usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/IO/Socket
+#usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/IO/Socket/SSL
+#usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/IO/Socket/SSL/.packlist
+#usr/share/man/man3/IO::Socket::SSL.3
diff --git a/config/rootfiles/packages/sendEmail b/config/rootfiles/packages/sendEmail
new file mode 100644 (file)
index 0000000..ee206e2
--- /dev/null
@@ -0,0 +1 @@
+usr/local/bin/sendEmail
index 4aaa38938c5473a40ce481822e9c46229a1c3cd7..d72677ceef81a95d3e0ea30a0e3dd69c66f36c05 100644 (file)
@@ -8,6 +8,11 @@
 #
 # $Id: updxlrator,v 2.1 2009/01/10 00:00:00 marco.s Exp $
 #
+# ChangeLog:
+#
+# 2012-10-26: nightshift - move curly bracket to capture AVG download source.
+#                       - Adding BIG HINT for new update source#
+#
 
 use strict;
 use HTTP::Date;
@@ -75,8 +80,8 @@ while (<>) {
        # -----------------------------------------------------------
 
        if (
-           (($source_url =~ m@^http://[^/]*\.microsoft\.com/.*\.(exe|psf|msi|msp|cab)$@i) ||
-            ($source_url =~ m@^http://[^/]*\.windowsupdate\.com/.*\.(exe|psf|msi|msp|cab)$@i))
+           (($source_url =~ m@^http://[^/]*\.microsoft\.com/.*\.(exe|psf|msi|msp|msu|cab)$@i) ||
+            ($source_url =~ m@^http://[^/]*\.windowsupdate\.com/.*\.(exe|psf|msi|msp|msu|cab)$@i))
        &&   ($source_url !~ m@^http://[^/]*\.microsoft\.com/.*(/autoupd|selfupdate/).*\.cab@i)
        &&   ($source_url !~ m@\&@)
           )
@@ -88,6 +93,7 @@ while (<>) {
        #  Section: Adobe Downloads
        # -----------------------------------------------------------
 
+
        if (
            ($source_url =~ m@^http://(ar)?download\.adobe\.com/.*\.(exe|msi|bin|dmg|idx|gz)$@i) ||
            ($source_url =~ m@^http://swupdl\.adobe\.com/updates/.*\.(exe|msi|bin|dmg|idx|gz|[a-z][a-z]_[A-Z][A-Z])$@i) ||
@@ -178,8 +184,6 @@ while (<>) {
                $xlrator_url = &check_cache($source_url,$hostaddr,$username,"IPFire",$mirror);
        }
 
-       }
-       
        # -----------------------------------------------------------
        # Section: AVG Downloads
        # -----------------------------------------------------------
@@ -189,6 +193,9 @@ while (<>) {
 #              $xlrator_url = &check_cache($source_url,$hostaddr,$username,"AVG",$mirror);
 #      }
 
+# ----------- ADD NEW SOURCES BEFORE THIS LINE !!! ------------------
+       }
+
        $request="$xlrator_url $hostaddr $username $method\n";
 
        print $request;
index 58ebdf2faea0d22e0a92e9daad768381a8c2d390..cbaecd9aabcec3e7e6414d513eae93caccb1ffcd 100644 (file)
@@ -863,7 +863,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save-adv-options'}) {
     }
                
     if ($cgiparams{'DHCP_DOMAIN'} ne ''){
-       unless (&General::validfqdn($cgiparams{'DHCP_DOMAIN'}) || &General::validip($cgiparams{'DHCP_DOMAIN'})) {
+       unless (&General::validdomainname($cgiparams{'DHCP_DOMAIN'}) || &General::validip($cgiparams{'DHCP_DOMAIN'})) {
                $errormessage = $Lang::tr{'invalid input for dhcp domain'};
        goto ADV_ERROR;
        }
@@ -4969,19 +4969,13 @@ END
 }
 
 
-       my $disable_clientdl = "disabled='disabled'";
-       if (( $cgiparams{'ENABLED'} eq 'on') || 
-           ( $cgiparams{'ENABLED_BLUE'} eq 'on') ||
-           ( $cgiparams{'ENABLED_ORANGE'} eq 'on')){
-           $disable_clientdl = "";
-       }
        print <<END
        <td align='center'>$active</td>
                
        <form method='post' name='frm${key}a'><td align='center'>
-           <input type='image'  name='$Lang::tr{'dl client arch'}' $disable_clientdl src='/images/openvpn.png' alt='$Lang::tr{'dl client arch'}' title='$Lang::tr{'dl client arch'}' border='0' />
-           <input type='hidden' name='ACTION' value='$Lang::tr{'dl client arch'}' $disable_clientdl />
-           <input type='hidden' name='KEY' value='$key' $disable_clientdl />
+           <input type='image'  name='$Lang::tr{'dl client arch'}' src='/images/openvpn.png' alt='$Lang::tr{'dl client arch'}' title='$Lang::tr{'dl client arch'}' border='0' />
+           <input type='hidden' name='ACTION' value='$Lang::tr{'dl client arch'}' />
+           <input type='hidden' name='KEY' value='$key' />
        </td></form>
 END
        ;
index e3e633cc4fdf81ff21d35f04875c3894b2cb975e..df77a86afdb2e690464d0b3d23b96821a7631bca 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
 #                                                                             #
 ###############################################################################
+#
+# Changelog:
+# 2012-10-27: nightshift - Bugfix regarding showing wrong vendor icon while Download of new Updates
+# 2012-10-27: nightshift - Optimizing logic of check for vendor icons
+#
 
 use strict;
 
@@ -75,6 +80,7 @@ my @vendors=();
 my %vendorstats=();
 
 my $repository = "/var/updatecache/";
+my $webhome = "/srv/web/ipfire/html"; 
 my $hintcolour = '#FFFFCC';
 my $colourgray = '#808080';
 
@@ -549,46 +555,23 @@ END
                        print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' />&nbsp;</td>\n";
                }
 
-                       print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
-                       if ($vendorid =~ /^Adobe$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^Microsoft$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^Symantec$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^Linux$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^TrendMicro$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^Apple$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</td>\n";
-                       } elsif ($vendorid =~ /^Avast$/i)
-                       {
-                               print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
-                       } else
-                       {
-                               if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif")
-                               {
-                                       print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
-                               } else {
-                                       print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
-                               }
-                       }
+               print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
 
-                       $shortname = substr($updatefile,rindex($updatefile,"/")+1);
-                       $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
+               if (($vendorid ne '') && (-e "$webhome/images/updbooster/updxl-src-$vendorid.gif"))
+               {
+                       print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
+               } else {
+                       print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
+               }
 
-                       $filesize = $dlinfo{'REMOTESIZE'};
-                       1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
-                       $dlinfo{'VENDORID'}=ucfirst $vendorid;
+               $shortname = substr($updatefile,rindex($updatefile,"/")+1);
+               $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
 
-                       print <<END
+               $filesize = $dlinfo{'REMOTESIZE'};
+               1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
+               $dlinfo{'VENDORID'} = ucfirst $vendorid;
+
+               print <<END
                <td class='base' align='center'>&nbsp;$dlinfo{'VENDORID'}&nbsp;</td>
                <td class='base' align='left' title='cache:/$updatefile'>$shortname</td>
                <td class='base' align='right'  nowrap='nowrap'>&nbsp;$filesize&nbsp;</td>
diff --git a/html/html/images/updbooster/updxl-src-microsoft.gif b/html/html/images/updbooster/updxl-src-microsoft.gif
new file mode 100644 (file)
index 0000000..14f3c42
Binary files /dev/null and b/html/html/images/updbooster/updxl-src-microsoft.gif differ
index 3b34016e7039d00d688d4e2151cdca42a241a29c..14f3c42cef555d53fbdafc8069b1c3bb02193f6a 100644 (file)
Binary files a/html/html/images/updbooster/updxl-src-windows.gif and b/html/html/images/updbooster/updxl-src-windows.gif differ
diff --git a/lfs/IO-Socket-SSL b/lfs/IO-Socket-SSL
new file mode 100644 (file)
index 0000000..fef8097
--- /dev/null
@@ -0,0 +1,62 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.78
+
+THISAPP    = IO-Socket-SSL-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = http://cpan.noris.de/authors/id/S/SU/SULLR/
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 172201f3ebc400dc3733a0577ac29095
+
+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
+       cd $(DIR_APP) && make install
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
\ No newline at end of file
diff --git a/lfs/sendEmail b/lfs/sendEmail
new file mode 100644 (file)
index 0000000..8611929
--- /dev/null
@@ -0,0 +1,69 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.56
+
+THISAPP    = sendEmail-v$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = sendEmail
+PAK_VER    = 1
+
+DEPS       = ""
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 5b7bec4373268fa6446fa59416bb99fb
+
+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) && cp -pvf sendEmail /usr/local/bin
+       chmod 755 /usr/local/bin/sendEmail
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
+
diff --git a/make.sh b/make.sh
index 05be85725dd272183df6e3f07bedaa1cbb893f84..b92d47a5d24ce93b9b3a55677ccc77ad7eb92850 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -536,6 +536,7 @@ buildipfire() {
   ipfiremake Net-IPv4Addr
   ipfiremake Net_SSLeay
   ipfiremake IO-Stringy
+  ipfiremake IO-Socket-SSL
   ipfiremake Unix-Syslog
   ipfiremake Mail-Tools
   ipfiremake MIME-Tools
@@ -754,6 +755,7 @@ buildipfire() {
   ipfiremake libstatgrab
   ipfiremake sarg
   ipfiremake fstrim
+  ipfiremake sendEmail
   echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
   cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
   echo >> $BASEDIR/build/var/ipfire/firebuild
index e54ecedc6b1dc7dc194954354c974805f54720e4..cc6b6190eb8ecb7c376934b1aa74968915c46c6c 100644 (file)
@@ -252,6 +252,7 @@ case "$1" in
        # upnp chain for our upnp daemon
        /sbin/iptables -t nat -N UPNPFW
        /sbin/iptables -t nat -A PREROUTING -j UPNPFW
+       /sbin/iptables -A FORWARD -m state --state NEW -j UPNPFW
        # This chain only contains dummy rules.
        /sbin/iptables -N UPNPFW