mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Hinzugefuegt:
* p2protocols-Datei, die vergessen wurde.
Geaendert:
* Connections.cgi gefixt.
* URLFilter - Man kann keinen eigenen Background hochladen,
bei der neuen redirect-Seite nichtmehr noetig.
* Bootsplash gefixt - Neues Script im Installer.
* Installer wieder hergestellt.
* Im SSH den Zertifikatslogin per default ausgemacht.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@205 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
9
config/cfgroot/p2protocols
Normal file
9
config/cfgroot/p2protocols
Normal file
@@ -0,0 +1,9 @@
|
||||
Bittorrent;bit;on;
|
||||
Edonkey;edk;on;
|
||||
KaZaA;kazaa;on;
|
||||
Gnutella;gnu;on;
|
||||
DirectConnect;dc;on;
|
||||
Applejuice;apple;on;
|
||||
WinMX;winmx;on;
|
||||
SoulSeek;soul;on;
|
||||
Ares;ares;on;
|
||||
@@ -1,4 +1,4 @@
|
||||
ENABLE_SSH_KEYS=on
|
||||
ENABLE_SSH_KEYS=off
|
||||
ENABLE_SSH_PROTOCOL1=off
|
||||
ENABLE_SSH_PASSWORDS=on
|
||||
ENABLE_SSH_PORTFW=off
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
#
|
||||
# (c) 2006 Franck - add sorting+filtering capability
|
||||
#
|
||||
# $Id: connections.cgi,v 1.6.2.12 2006/02/27 19:48:46 franck78 Exp $
|
||||
#
|
||||
|
||||
# Setup GREEN, ORANGE, IPCOP, VPN CIDR networks, masklengths and colours only once
|
||||
# Setup GREEN, ORANGE, IPFIRE, VPN CIDR networks, masklengths and colours only once
|
||||
|
||||
my @network=();
|
||||
my @masklen=();
|
||||
@@ -20,8 +18,8 @@ use Net::IPv4Addr qw( :all );
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
use warnings;
|
||||
use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
@@ -74,6 +72,38 @@ push(@network, '127.0.0.1');
|
||||
push(@masklen, '255.255.255.255' );
|
||||
push(@colour, ${Header::colourfw} );
|
||||
|
||||
# Add Orange Network
|
||||
if ($netsettings{'ORANGE_DEV'}) {
|
||||
push(@network, $netsettings{'ORANGE_NETADDRESS'});
|
||||
push(@masklen, $netsettings{'ORANGE_NETMASK'} );
|
||||
push(@colour, ${Header::colourorange} );
|
||||
# Add Orange Routes to Array
|
||||
@routes = `/sbin/route -n | /bin/grep $netsettings{'ORANGE_DEV'}`;
|
||||
foreach my $route (@routes) {
|
||||
chomp($route);
|
||||
my @temp = split(/[\t ]+/, $route);
|
||||
push(@network, $temp[0]);
|
||||
push(@masklen, $temp[2]);
|
||||
push(@colour, ${Header::colourorange} );
|
||||
}
|
||||
}
|
||||
|
||||
# Add Blue Network
|
||||
if ($netsettings{'BLUE_DEV'}) {
|
||||
push(@network, $netsettings{'BLUE_NETADDRESS'});
|
||||
push(@masklen, $netsettings{'BLUE_NETMASK'} );
|
||||
push(@colour, ${Header::colourblue} );
|
||||
# Add Blue Routes to Array
|
||||
@routes = `/sbin/route -n | /bin/grep $netsettings{'BLUE_DEV'}`;
|
||||
foreach my $route (@routes) {
|
||||
chomp($route);
|
||||
my @temp = split(/[\t ]+/, $route);
|
||||
push(@network, $temp[0]);
|
||||
push(@masklen, $temp[2]);
|
||||
push(@colour, ${Header::colourblue} );
|
||||
}
|
||||
}
|
||||
|
||||
# Add OpenVPN net and RED/BLUE/ORANGE entry (when appropriate)
|
||||
if (-e "${General::swroot}/ovpn/settings") {
|
||||
my %ovpnsettings = ();
|
||||
@@ -108,38 +138,6 @@ if (-e "${General::swroot}/ovpn/settings") {
|
||||
}
|
||||
}
|
||||
|
||||
# Add Orange Network
|
||||
if ($netsettings{'ORANGE_DEV'}) {
|
||||
push(@network, $netsettings{'ORANGE_NETADDRESS'});
|
||||
push(@masklen, $netsettings{'ORANGE_NETMASK'} );
|
||||
push(@colour, ${Header::colourorange} );
|
||||
# Add Orange Routes to Array
|
||||
@routes = `/sbin/route -n | /bin/grep $netsettings{'ORANGE_DEV'}`;
|
||||
foreach my $route (@routes) {
|
||||
chomp($route);
|
||||
my @temp = split(/[\t ]+/, $route);
|
||||
push(@network, $temp[0]);
|
||||
push(@masklen, $temp[2]);
|
||||
push(@colour, ${Header::colourorange} );
|
||||
}
|
||||
}
|
||||
|
||||
# Add Blue Network
|
||||
if ($netsettings{'BLUE_DEV'}) {
|
||||
push(@network, $netsettings{'BLUE_NETADDRESS'});
|
||||
push(@masklen, $netsettings{'BLUE_NETMASK'} );
|
||||
push(@colour, ${Header::colourblue} );
|
||||
# Add Blue Routes to Array
|
||||
@routes = `/sbin/route -n | /bin/grep $netsettings{'BLUE_DEV'}`;
|
||||
foreach my $route (@routes) {
|
||||
chomp($route);
|
||||
my @temp = split(/[\t ]+/, $route);
|
||||
push(@network, $temp[0]);
|
||||
push(@masklen, $temp[2]);
|
||||
push(@colour, ${Header::colourblue} );
|
||||
}
|
||||
}
|
||||
|
||||
# Add STATIC RED aliases
|
||||
if ($netsettings{'RED_DEV'}) {
|
||||
# We have a RED eth iface
|
||||
@@ -188,12 +186,15 @@ my @list_state = ($Lang::tr{'all'}, 'SYN_SENT', 'SYN_RECV', 'ESTABLISHED', 'FIN_
|
||||
'CLOSE_WAIT', 'LAST_ACK', 'TIME_WAIT', 'CLOSE', 'LISTEN');
|
||||
my @list_mark = ($Lang::tr{'all'}, '[ASSURED]', '[UNREPLIED]');
|
||||
my @list_sort = ('orgsip','protocol', 'expires', 'status', 'orgdip', 'orgsp',
|
||||
'orgdp', 'exsip', 'exdip', 'exsp', 'exdp');
|
||||
'orgdp', 'exsip', 'exdip', 'exsp', 'exdp', 'marked');
|
||||
|
||||
# init or silently correct unknown value...
|
||||
if ( ! grep ( /^$cgiparams{'SEE_PROTO'}$/ , @list_proto )) { $cgiparams{'SEE_PROTO'} = $list_proto[0] };
|
||||
if ( ! grep ( /^$cgiparams{'SEE_STATE'}$/ , @list_state )) { $cgiparams{'SEE_STATE'} = $list_state[0] };
|
||||
if ( ! grep ( /^$cgiparams{'SEE_MARK'}$/ , @list_mark )) { $cgiparams{'SEE_MARK'} = $list_mark[0] };
|
||||
if ( ($cgiparams{'SEE_MARK'} ne $Lang::tr{'all'}) && # ok the grep should work but it doesn't because of
|
||||
($cgiparams{'SEE_MARK'} ne '[ASSURED]') && # the '[' & ']' interpreted as list separator.
|
||||
($cgiparams{'SEE_MARK'} ne '[UNREPLIED]') # So, explicitly enumerate items.
|
||||
) { $cgiparams{'SEE_MARK'} = $list_mark[0] };
|
||||
if ( ! grep ( /^$cgiparams{'SEE_SORT'}$/ , @list_sort )) { $cgiparams{'SEE_SORT'} = $list_sort[0] };
|
||||
# *.*.*.* or a valid IP
|
||||
if ( $cgiparams{'SEE_SRC'} !~ /^(\*\.\*\.\*\.\*\.|\d+\.\d+\.\d+\.\d+)$/) { $cgiparams{'SEE_SRC'} = '*.*.*.*' };
|
||||
@@ -396,6 +397,7 @@ my $menu_sort = &make_select ('SEE_SORT', $cgiparams{'SEE_SORT'}, @list_sort)
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'connection tracking'});
|
||||
|
||||
print <<END
|
||||
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<table width='60%'>
|
||||
<tr><td align='center'><b>$Lang::tr{'legend'} : </b></td>
|
||||
<td align='center' bgcolor='${Header::colourgreen}'><b><font color='#FFFFFF'>$Lang::tr{'lan'}</font></b></td>
|
||||
@@ -419,28 +421,26 @@ print <<END
|
||||
<td align='center'><b>$Lang::tr{'marked'}</b></td>
|
||||
<td align='center'><b>$Lang::tr{'use'}</b></td>
|
||||
</tr>
|
||||
<tr><form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||
<tr>
|
||||
<td align='center'>$menu_proto</td>
|
||||
<td></td>
|
||||
<td> </td>
|
||||
<td align='center'>$menu_state</td>
|
||||
<td align='center'>$menu_src</td>
|
||||
<td align='center'>$menu_dest</td>
|
||||
<td align='center'colspan='2'>$Lang::tr{'sort ascending'}:$menu_sort </td>
|
||||
<td align='center'>$menu_mark</td>
|
||||
<td align='center'><input type='submit' value='!' /></td>
|
||||
</form>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
|
||||
foreach my $entry (sort sort_entries keys %entries) {
|
||||
|
||||
print "<tr bgcolor='${Header::table1colour}'>";
|
||||
my $orgsipcolour = &ipcolour( $entries{$entry}->{orgsip} );
|
||||
my $orgdipcolour = &ipcolour( $entries{$entry}->{orgdip} );
|
||||
my $exsipcolour = &ipcolour( $entries{$entry}->{exsip} );
|
||||
my $exdipcolour = &ipcolour( $entries{$entry}->{exdip} );
|
||||
print <<END
|
||||
<tr bgcolor='${Header::table1colour}'>
|
||||
<td align='center'>$entries{$entry}->{protocol}</td>
|
||||
<td align='center'>$entries{$entry}->{expires}</td>
|
||||
<td align='center'>$entries{$entry}->{status}</td>
|
||||
@@ -467,7 +467,7 @@ END
|
||||
;
|
||||
}
|
||||
|
||||
print "$unknownlines</table>";
|
||||
print "$unknownlines</table></form>";
|
||||
|
||||
&Header::closebox();
|
||||
&Header::closebigbox();
|
||||
@@ -500,7 +500,7 @@ sub make_select ($,$,$) {
|
||||
|
||||
foreach my $value (@_) {
|
||||
my $check = $selected eq $value ? "selected='selected'" : '';
|
||||
$select .= "<option $check value='$value'>$value";
|
||||
$select .= "<option $check value='$value'>$value</option>";
|
||||
}
|
||||
$select .= "</select>";
|
||||
return $select;
|
||||
|
||||
@@ -147,7 +147,6 @@ if (($filtersettings{'ACTION'} eq $Lang::tr{'save'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter save and restart'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter upload file'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter remove file'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter upload background'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter upload blacklist'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter backup'}) ||
|
||||
($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter restore'}))
|
||||
@@ -187,17 +186,6 @@ if (($filtersettings{'ACTION'} eq $Lang::tr{'save'}) ||
|
||||
|
||||
}
|
||||
|
||||
if ($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter upload background'})
|
||||
{
|
||||
&Header::getcgihash(\%filtersettings, {'wantfile' => 1, 'filevar' => 'BACKGROUND'});
|
||||
|
||||
if (copy($filtersettings{'BACKGROUND'}, "/home/httpd/html/images/urlfilter/background.jpg") != 1)
|
||||
{
|
||||
$errormessage = $!;
|
||||
goto ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter upload blacklist'})
|
||||
{
|
||||
&Header::getcgihash(\%filtersettings, {'wantfile' => 1, 'filevar' => 'UPDATEFILE'});
|
||||
@@ -1379,17 +1367,6 @@ print <<END
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td class='base'><b>$Lang::tr{'urlfilter background image'}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br>$Lang::tr{'urlfilter background text'}:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='file' name='BACKGROUND' size='40' /> <input type='submit' name='ACTION' value='$Lang::tr{'urlfilter upload background'}' /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr size='1'>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
|
||||
@@ -65,6 +65,6 @@ $(TARGET) :
|
||||
cd $(DIR_APP)/install && make CFLAGS="-Os -fomit-frame-pointer -Wall \
|
||||
-DNAME='\"$(NAME)\"' -DSNAME='\"$(SNAME)\"' -DVERSION='\"$(VERSION)\"' \
|
||||
-DSLOGAN='\"$(SLOGAN)\"' -DCONFIG_ROOT='\"$(CONFIG_ROOT)\"' -DKERNEL_VERSION='\"$(KVER)\"'"
|
||||
cd $(DIR_APP)/install && install -m 0755 install probescsi.sh /install/initrd/bin
|
||||
cd $(DIR_APP)/install && install -v -m 0755 install probescsi.sh installbootsplash.sh /install/initrd/bin
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
|
||||
@@ -98,7 +98,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
/bin/tar --no-same-owner -xzf $(DIR_CONF)/urlfilter/blacklists.tar.gz -C /var/ipfire/urlfilter
|
||||
/usr/bin/perl $(DIR_CONF)/urlfilter/makeconf.pl
|
||||
chown -R nobody:nobody /var/ipfire/urlfilter
|
||||
chown -R nobody:nobody /home/httpd/html/images/urlfilter
|
||||
chmod 755 /home/httpd/html/images/urlfilter
|
||||
chmod 644 /home/httpd/html/images/urlfilter/*
|
||||
chown -R nobody:nobody /home/httpd/html/repository
|
||||
chown -R squid:squid /var/log/squidGuard
|
||||
|
||||
|
||||
7
src/install+setup/install/installbootsplash.sh
Normal file
7
src/install+setup/install/installbootsplash.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
if [ -e /harddisk/boot/ipfirerd.img ]; then
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd.img
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg >> /harddisk/boot/ipfirerd-smp.img
|
||||
else
|
||||
/sbin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cfg > /harddisk/boot/initrd.splash
|
||||
fi
|
||||
@@ -193,16 +193,13 @@ int main(int argc, char *argv[])
|
||||
sprintf (title, "%s v%s - %s", NAME, VERSION, SLOGAN);
|
||||
newtWinMessage(title, ctr[TR_OK], message);
|
||||
|
||||
/* sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
|
||||
* rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
|
||||
* 50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
|
||||
* ctr[TR_CANCEL], NULL);
|
||||
*
|
||||
* if (rc == 2)
|
||||
* goto EXIT;
|
||||
* This is for avoiding the question for a network installation. Set to cdrom.
|
||||
*/
|
||||
sprintf(installtype, CDROM_INSTALL, NAME);
|
||||
sprintf(message, ctr[TR_SELECT_INSTALLATION_MEDIA_LONG], NAME);
|
||||
rc = newtWinMenu(ctr[TR_SELECT_INSTALLATION_MEDIA], message,
|
||||
50, 5, 5, 6, installtypes, &installtype, ctr[TR_OK],
|
||||
ctr[TR_CANCEL], NULL);
|
||||
|
||||
if (rc == 2)
|
||||
goto EXIT;
|
||||
|
||||
if (installtype == CDROM_INSTALL)
|
||||
{
|
||||
@@ -963,12 +960,7 @@ RESTORE:
|
||||
goto EXIT;
|
||||
}
|
||||
/* Set Bootsplash */
|
||||
if ((handle = fopen("/scsidriver", "r")))
|
||||
mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf >> /harddisk/boot/ipfirerd.img");
|
||||
else
|
||||
mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf > /harddisk/boot/initrd.splash");
|
||||
if ((handle = fopen("/scsidriver", "r")))
|
||||
mysystem("/bin/chroot /harddisk /sbin/splash -s -f /boot/splash/config/bootsplash-1024x768.cgf >> /harddisk/boot/ipfirerd-smp.img");
|
||||
mysystem("/bin/installbootsplash.sh");
|
||||
mysystem("/bin/chroot /harddisk /bin/umount -n /proc");
|
||||
#endif
|
||||
#ifdef __alpha__
|
||||
|
||||
Reference in New Issue
Block a user