Merge remote-tracking branch 'origin/next' into thirteen

Conflicts:
	config/rootfiles/common/stage2
	make.sh
This commit is contained in:
Arne Fitzenreiter
2012-12-06 19:29:29 +01:00
44 changed files with 3641 additions and 250 deletions

View File

@@ -24,6 +24,7 @@ my $unique=time;
my $squidlogdir = "/var/log/squid";
my $reportdir = "${General::swroot}/proxy/calamaris/reports";
my $sargdir = "/var/log/sarg";
unless (-e $reportdir) { mkdir($reportdir) }
@@ -98,6 +99,7 @@ if ($reportsettings{'ACTION'} eq $Lang::tr{'calamaris create report'})
delete $reportsettings{'DAY_END'};
delete $reportsettings{'MONTH_END'};
delete $reportsettings{'YEAR_END'};
delete $reportsettings{'REPORT'};
&General::writehash("${General::swroot}/proxy/calamaris/settings", \%reportsettings);
@@ -240,6 +242,86 @@ if ($errormessage) {
&Header::closebox();
}
# Link sarg reports.
if (-e $sargdir) {
&Header::openbox('100%', 'left', "$Lang::tr{'proxy reports'}:");
print <<END;
<table width="100%">
<tr>
END
# Today.
if (-e "$sargdir/today") {
print <<END;
<td width="25%" align="center">
<a href="/proxy-reports/today" target="_blank">$Lang::tr{'proxy reports today'}</a>
</td>
END
} else {
print <<END;
<td width="25%" align="center">
$Lang::tr{'proxy reports today'}
</td>
END
}
# Daily.
if (-e "$sargdir/daily") {
print <<END;
<td width="25%" align="center">
<a href="/proxy-reports/daily" target="_blank">$Lang::tr{'proxy reports daily'}</a>
</td>
END
} else {
print <<END;
<td width="25%" align="center">
$Lang::tr{'proxy reports daily'}
</td>
END
}
# Weekly.
if (-e "$sargdir/weekly") {
print <<END;
<td width="25%" align="center">
<a href="/proxy-reports/weekly" target="_blank">$Lang::tr{'proxy reports weekly'}</a>
</td>
END
} else {
print <<END;
<td width="25%" align="center">
$Lang::tr{'proxy reports weekly'}
</td>
END
}
# Monthly.
if (-e "$sargdir/monthly") {
print <<END;
<td width="25%" align="center">
<a href="/proxy-reports/monthly" target="_blank">$Lang::tr{'proxy reports monthly'}</a>
</td>
END
} else {
print <<END;
<td width="25%" align="center">
$Lang::tr{'proxy reports monthly'}
</td>
END
}
print <<END;
</tr>
</table>
<br><br>
END
&Header::closebox();
}
&Header::openbox('100%', 'left', "$Lang::tr{'settings'}:");
print <<END
@@ -493,12 +575,11 @@ END
if (@reports)
{
print "<td><select name='REPORT' size='5'>\n";
my $n=0;
foreach (@reports)
{
@reportdata=split(/#/);
print "\t<option ";
if ($n eq '0') { print "selected "; $reportsettings{'REPORT'}=$reportdata[1]; $n++}
if ($reportsettings{'REPORT'} eq $reportdata[1]) { print "selected ";}
print "value='$reportdata[1]'>$reportdata[2] &nbsp;-&nbsp; $reportdata[3]</option>\n";
}
print "</select></td>\n";

1448
html/cgi-bin/ovpnmain.cgi Normal file → Executable file

File diff suppressed because it is too large Load Diff

8
html/cgi-bin/vpnmain.cgi Normal file → Executable file
View File

@@ -1367,6 +1367,14 @@ END
goto VPNCONF_ERROR;
}
if ($cgiparams{'TYPE'} eq 'net'){
$errormessage=&General::checksubnets($cgiparams{'NAME'},$cgiparams{'REMOTE_SUBNET'});
if ($errormessage ne ''){
goto VPNCONF_ERROR;
}
}
if ($cgiparams{'AUTH'} eq 'psk') {
if (! length($cgiparams{'PSK'}) ) {
$errormessage = $Lang::tr{'pre-shared key is too short'};