summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorVinicius Coque <vinicius.coque@bluepex.com>2011-07-06 09:41:50 -0300
committerVinicius Coque <vinicius.coque@bluepex.com>2011-07-06 09:41:50 -0300
commit1623ed9700dd89ee871313add2c4947c1227cc39 (patch)
treef1809bd8552dd406bcef2cad32b982516c0262fb /usr
parent4842755397c92f1c16b50b16e01b28768f8b43c1 (diff)
parentf49c41c538e718d06b44e9c2d279ba9b9580b5ff (diff)
downloadpfsense-1623ed9700dd89ee871313add2c4947c1227cc39.zip
pfsense-1623ed9700dd89ee871313add2c4947c1227cc39.tar.gz
Merge remote-tracking branch 'mainline/master' into inc
Conflicts: etc/inc/priv.defs.inc
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/sbin/ovpn-linkup14
-rwxr-xr-xusr/local/www/crash_reporter.php7
-rwxr-xr-xusr/local/www/diag_nanobsd.php4
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php5
-rwxr-xr-xusr/local/www/index.php9
-rwxr-xr-xusr/local/www/pkg_edit.php11
-rw-r--r--usr/local/www/system_certmanager.php8
-rwxr-xr-xusr/sbin/pc-sysinstall/backend/functions-bsdlabel.sh2
8 files changed, 38 insertions, 22 deletions
diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup
index b613a9a..0f1ca80 100755
--- a/usr/local/sbin/ovpn-linkup
+++ b/usr/local/sbin/ovpn-linkup
@@ -2,11 +2,17 @@
# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"
-if [ "" != "$route_vpn_gateway" ]; then
- /bin/echo $route_vpn_gateway > /tmp/$1_router
-else
- /bin/echo $5 > /tmp/$1_router
+
+
+ifindex="${1##?????}"
+if [ -f /dev/tun$ifindex ]; then
+ if [ "" != "$route_vpn_gateway" ]; then
+ /bin/echo $route_vpn_gateway > /tmp/$1_router
+ else
+ /bin/echo $5 > /tmp/$1_router
+ fi
fi
+
/usr/bin/touch /tmp/$1up
# reload filter
/usr/local/sbin/pfSctl -c "interface newip $1"
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php
index d423568..924532c 100755
--- a/usr/local/www/crash_reporter.php
+++ b/usr/local/www/crash_reporter.php
@@ -65,9 +65,8 @@ function upload_crash_report($files) {
}
function output_crash_reporter_html($crash_reports) {
- echo "<strong>" . gettext("Unfortunately we have detected a kernel crash (panic).") . "</strong></p>";
- echo "If you are unfamiliar with kernel panics wikipedia has information <a target='_new' href='http://en.wikipedia.org/wiki/Kernel_panic'>here</a>.<p/>";
- echo gettext("Would you like to submit the crash debug logs to the pfSense developers for inspection?") . "</p>";
+ echo "<strong>" . gettext("Unfortunately we have detected a programming bug.") . "</strong></p>";
+ echo gettext("Would you like to submit the programming debug logs to the pfSense developers for inspection?") . "</p>";
echo "<p>";
echo "<i>" . gettext("Please double check the contents to ensure you are comfortable sending this information before clicking Yes.") . "</i><br/>";
echo "<p>";
@@ -102,6 +101,8 @@ $crash_report_header .= "\nCrash report details:\n";
echo gettext("Processing...");
file_put_contents("/var/crash/crashreport_header.txt", $crash_report_header);
exec("/usr/bin/gzip /var/crash/*");
+ if(file_exists("/tmp/PHP_errors.log"))
+ exec("cp /tmp/PHP_errors.log /var/crash/");
$files_to_upload = glob("/var/crash/*");
echo "<p/>";
echo gettext("Uploading...");
diff --git a/usr/local/www/diag_nanobsd.php b/usr/local/www/diag_nanobsd.php
index af4efd6..51348cf 100755
--- a/usr/local/www/diag_nanobsd.php
+++ b/usr/local/www/diag_nanobsd.php
@@ -193,7 +193,7 @@ if ($savemsg)
<? } ?>
</select>
<br/>
- <?=gettext("This will peridoically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
+ <?=gettext("This will periodically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
<br/>
<br/>
</td>
@@ -210,7 +210,7 @@ if ($savemsg)
<? } ?>
</select>
<br/>
- <?=gettext("This will peridoically backup the DHCP leases data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
+ <?=gettext("This will periodically backup the DHCP leases data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.");?>
<br/>
<br/>
</td>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 8602740..9d0f120 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -252,7 +252,10 @@ if ($_POST) {
if($_POST["address{$x}"] <> "") {
if (is_alias($_POST["address{$x}"])) {
if (!alias_same_type($_POST["address{$x}"], $_POST['type']))
- $wrongaliases .= " " . $_POST["address{$x}"];
+ // But alias type network can include alias type urltable. Feature#1603.
+ if (!($_POST['type'] == 'network' &&
+ get_alias_type($_POST["address{$x}"]) == 'urltable'))
+ $wrongaliases .= " " . $_POST["address{$x}"];
} else if ($_POST['type'] == "port") {
if (!is_port($_POST["address{$x}"]))
$input_errors[] = $_POST["address{$x}"] . " " . gettext("is not a valid port or alias.");
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 92376e5..2b9be16 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -58,8 +58,13 @@ require_once('notices.inc');
if($g['disablecrashreporter'] != true) {
// Check to see if we have a crash report
- $crash = glob("/var/crash/*");
$x = 0;
+ if(file_exists("/tmp/PHP_errors.log")) {
+ $total = `/bin/cat /tmp/PHP_errors.log | /usr/bin/grep -vi warning | wc -l | awk '{ print $1 }'`;
+ if($total > 0)
+ $x++;
+ }
+ $crash = glob("/var/crash/*");
$skip_files = array(".", "..", "minfree", "");
if(is_array($crash)) {
foreach($crash as $c) {
@@ -67,7 +72,7 @@ if($g['disablecrashreporter'] != true) {
$x++;
}
if($x > 0)
- $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information.";
+ $savemsg = "{$g['product_name']} has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information.";
}
}
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 64b1fa9..c5187ef 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -196,11 +196,12 @@ if ($_POST) {
}
} else {
$fieldname = $fields['fieldname'];
- $fieldvalue = $_POST[$fieldname];
- if (is_array($fieldvalue))
- $fieldvalue = implode(',', $fieldvalue);
- else {
- $fieldvalue = trim($fieldvalue);
+ if ($fieldname == "interface_array") {
+ $fieldvalue = $_POST[$fieldname];
+ } elseif (is_array($fieldvalue)) {
+ $fieldvalue = implode(',', $_POST[$fieldname]);
+ } else {
+ $fieldvalue = trim($_POST[$fieldname]);
if ($fields['encoding'] == 'base64')
$fieldvalue = base64_encode($fieldvalue);
}
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 6b0d81e..1fd7323 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -592,25 +592,25 @@ function internalca_change() {
<tr>
<td align="right"><?=gettext("Country Code");?> : &nbsp;</td>
<td align="left">
- <input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>" readonly/>
+ <input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>"/>
</td>
</tr>
<tr>
<td align="right"><?=gettext("State or Province");?> : &nbsp;</td>
<td align="left">
- <input name="dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_state']);?>" readonly/>
+ <input name="dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_state']);?>"/>
</td>
</tr>
<tr>
<td align="right"><?=gettext("City");?> : &nbsp;</td>
<td align="left">
- <input name="dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_city']);?>" readonly/>
+ <input name="dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_city']);?>"/>
</td>
</tr>
<tr>
<td align="right"><?=gettext("Organization");?> : &nbsp;</td>
<td align="left">
- <input name="dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_organization']);?>" readonly/>
+ <input name="dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_organization']);?>"/>
</td>
</tr>
<tr>
diff --git a/usr/sbin/pc-sysinstall/backend/functions-bsdlabel.sh b/usr/sbin/pc-sysinstall/backend/functions-bsdlabel.sh
index 316b46c..25dfcc5 100755
--- a/usr/sbin/pc-sysinstall/backend/functions-bsdlabel.sh
+++ b/usr/sbin/pc-sysinstall/backend/functions-bsdlabel.sh
@@ -123,7 +123,7 @@ gen_glabel_name()
# Check if we are doing /, and rename it
if [ "$MOUNT" = "/" ]
then
- NAME="rootfs"
+ NAME=`cat /etc/inc/globals.inc | grep product_name | awk '{ print $3 }' | cut -d'"' -f2`
else
# If doing a swap partition, also rename it
if [ "${TYPE}" = "SWAP" ]
OpenPOWER on IntegriCloud