aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/asterisk/asterisk.inc286
-rw-r--r--config/asterisk/asterisk.xml87
-rw-r--r--config/asterisk/asterisk_calls.php181
-rw-r--r--config/asterisk/asterisk_cmd.php132
-rw-r--r--config/asterisk/asterisk_edit_file.php425
-rw-r--r--config/asterisk/asterisk_log.php110
-rw-r--r--config/asterisk/pkg_asterisk.inc2
-rw-r--r--config/filemgr/file_manager.php91
-rw-r--r--config/filemgr/filemgr.xml7
-rw-r--r--config/git/git.xml35
-rw-r--r--config/iftop/iftop.xml35
-rw-r--r--config/ipmitool/ipmitool.xml35
-rw-r--r--config/pfblockerng/pfblockerng.sh6
-rw-r--r--config/siproxd/siproxd.inc247
-rw-r--r--config/siproxd/siproxd.xml12
-rw-r--r--config/siproxd/siproxd_registered_phones.php172
-rw-r--r--config/siproxd/siproxdusers.xml12
-rwxr-xr-xconfig/snort/snort.inc12
-rwxr-xr-xconfig/snort/snort.xml2
-rwxr-xr-xconfig/snort/snort_check_for_rule_updates.php17
-rw-r--r--config/snort/snort_defs.inc9
-rw-r--r--config/snort/snort_migrate_config.php4
-rw-r--r--config/snort/snort_passlist.php3
-rw-r--r--config/snort/snort_passlist_edit.php17
-rw-r--r--config/snort/snort_post_install.php4
-rw-r--r--config/urlsnarf/urlsnarf.xml35
-rw-r--r--pkg_config.10.xml10
27 files changed, 989 insertions, 999 deletions
diff --git a/config/asterisk/asterisk.inc b/config/asterisk/asterisk.inc
index 9a89d885..22a7b96c 100644
--- a/config/asterisk/asterisk.inc
+++ b/config/asterisk/asterisk.inc
@@ -1,118 +1,109 @@
<?php
-/* ========================================================================== */
/*
asterisk.inc
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2012-2013 Marcello Coutinho
- Copyright (C) 2012-2013 robi <robreg@zsurob.hu>
- All rights reserved.
- */
-/* ========================================================================== */
-/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2012-2013 Marcello Coutinho
+ Copyright (C) 2012-2013 robi <robreg@zsurob.hu>
+ Copyright (C) 2015 ESF, LLC
+ All rights reserved.
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
define('ASTERISK_CONF_DIR', '/conf/asterisk');
-//Check pfsense version
-$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
-if ($pf_version == "2.1" || $pf_version == "2.2")
+$pf_version=substr(trim(file_get_contents("/etc/version")), 0, 3);
+if ($pf_version == "2.1" || $pf_version == "2.2") {
define('ASTERISK_LOCALBASE', '/usr/pbi/asterisk-' . php_uname("m"));
-else
+} else {
define('ASTERISK_LOCALBASE','/usr/local');
+}
function asterisk_install() {
+ // Remove rc script from previous package versions
+ unlink_if_exists("/usr/local/etc/rc.d/asterisk");
sync_package_asterisk();
}
function asterisk_deinstall() {
- $script='/usr/local/etc/rc.d/asterisk';
- if (file_exists($script)){
- mwexec("$script stop");
- chmod ($script,0444);
- }
+ stop_service("asterisk");
+ unlink_if_exists("/usr/local/etc/rc.d/asterisk.sh");
}
function sync_package_asterisk() {
- global $config, $g;
-
- #mount filesystem writeable
conf_mount_rw();
-
- //for NanoBSD compatibility, move the /etc/asterisk configuration directory to /conf, and symlink it back
- $dist_dir=ASTERISK_CONF_DIR ."/dist";
- if (!is_dir($dist_dir))
- mkdir($dist_dir,0755,TRUE);
- if(file_exists (ASTERISK_LOCALBASE."/etc/asterisk") && !is_link(ASTERISK_LOCALBASE."/etc/asterisk")){
- $dist_files= scandir(ASTERISK_LOCALBASE."/etc/asterisk");
- foreach ($dist_files as $dist){
- if (preg_match("/-dist/",$dist))
- rename (ASTERISK_LOCALBASE."/etc/asterisk"."/$dist", "$dist_dir/$dist");
- elseif (preg_match("/\w+/",$dist))
- rename (ASTERISK_LOCALBASE."/etc/asterisk"."/$dist", ASTERISK_CONF_DIR."/$dist");
- }
- rmdir(ASTERISK_LOCALBASE. "/etc/asterisk");
- symlink (ASTERISK_CONF_DIR , ASTERISK_LOCALBASE. "/etc/asterisk");
- }
-
- //fix asterisk options for nanobsd: logging, db and calls log in /tmp
- // if ($g['platform'] == "nanobsd"){
- $script='/conf/asterisk/logger.conf';
- if (file_exists($script)){
- $script_file=file_get_contents($script);
- $pattern[0]='@;rotatestrategy@';
- $replace[0]='rotatestrategy = rotate ;by pfSense ;';
- $script_file=preg_replace($pattern,$replace,$script_file);
- file_put_contents($script, $script_file, LOCK_EX);
- }
-
- $script='/conf/asterisk/asterisk.conf';
- if (file_exists($script)){
- //point to the /var subdirs in the writable area in RAM
- $script_file=file_get_contents($script);
- $pattern[0]='/(\Wdirectories\W)\S+/';
- $replace[0]='$1';
- $pattern[1]='/astetcdir => \S+/';
- $replace[1]='astetcdir => /conf/asterisk';
- $pattern[2]='/astdbdir => \S+/';
- $replace[2]='astdbdir => /var/db/asterisk';
- $pattern[3]='/astspooldir => \S+/';
- $replace[3]='astspooldir => /var/spool/asterisk';
- $pattern[4]='/astrundir => \S+/';
- $replace[4]='astrundir => /var/run/asterisk';
- $pattern[5]='/astlogdir => \S+/';
- $replace[5]='astlogdir => /var/log/asterisk';
- $script_file=preg_replace($pattern,$replace,$script_file);
- file_put_contents($script, $script_file, LOCK_EX);
+ // For NanoBSD compatibility, move the /etc/asterisk configuration directory to /conf, and symlink it back
+ $dist_dir = ASTERISK_CONF_DIR . "/dist";
+ safe_mkdir($dist_dir, 0755);
+
+ if (file_exists (ASTERISK_LOCALBASE . "/etc/asterisk") && !is_link(ASTERISK_LOCALBASE . "/etc/asterisk")) {
+ $dist_files = scandir(ASTERISK_LOCALBASE . "/etc/asterisk");
+ foreach ($dist_files as $dist) {
+ if (preg_match("/-dist/", $dist)) {
+ rename (ASTERISK_LOCALBASE . "/etc/asterisk" . "/$dist", "$dist_dir/$dist");
+ } elseif (preg_match("/\w+/", $dist)) {
+ rename (ASTERISK_LOCALBASE . "/etc/asterisk" . "/$dist", ASTERISK_CONF_DIR . "/$dist");
+ }
}
-// }
+ rmdir(ASTERISK_LOCALBASE . "/etc/asterisk");
+ symlink(ASTERISK_CONF_DIR, ASTERISK_LOCALBASE . "/etc/asterisk");
+ }
- //add modules settings, for disabling those not required on pfSense
- $script='/conf/asterisk/modules.conf';
- if (file_exists($script)){
- $script_file=file_get_contents($script);
- if (strpos($script_file,'pfSense') === false) { //first check if already added...
- $add_modules_settings=<<<EOF
+ // Fix asterisk options for NanoBSD: logging, db and calls log in /tmp
+ $script = '/conf/asterisk/logger.conf';
+ if (file_exists($script)) {
+ $script_file = file_get_contents($script);
+ $pattern[0] = '@;rotatestrategy@';
+ $replace[0] = 'rotatestrategy = rotate ;by pfSense ;';
+ $script_file = preg_replace($pattern, $replace, $script_file);
+ file_put_contents($script, $script_file, LOCK_EX);
+ }
+
+ $script = '/conf/asterisk/asterisk.conf';
+ if (file_exists($script)) {
+ // Point to the /var subdirs in the writable area in ramfs
+ $script_file = file_get_contents($script);
+ $pattern[0] = '/(\Wdirectories\W)\S+/';
+ $replace[0] = '$1';
+ $pattern[1] = '/astetcdir => \S+/';
+ $replace[1] = 'astetcdir => /conf/asterisk';
+ $pattern[2] = '/astdbdir => \S+/';
+ $replace[2] = 'astdbdir => /var/db/asterisk';
+ $pattern[3] = '/astspooldir => \S+/';
+ $replace[3] = 'astspooldir => /var/spool/asterisk';
+ $pattern[4] = '/astrundir => \S+/';
+ $replace[4] = 'astrundir => /var/run/asterisk';
+ $pattern[5] = '/astlogdir => \S+/';
+ $replace[5] = 'astlogdir => /var/log/asterisk';
+ $script_file = preg_replace($pattern, $replace, $script_file);
+ file_put_contents($script, $script_file, LOCK_EX);
+ }
+
+ // Add modules settings, for disabling those not required on pfSense
+ $script = '/conf/asterisk/modules.conf';
+ if (file_exists($script)) {
+ $script_file = file_get_contents($script);
+ // First check if already added...
+ if (strpos($script_file, 'pfSense') === false) {
+ $add_modules_settings = <<<EOF
;The following modules settings work out of the box on pfSense (note: do not remove this comment line).
;Should you need any disabled module, check for its functionality individually in your environment.
;For more information check asterisk's online documentation.
@@ -327,32 +318,34 @@ noload => chan_h323.so
noload => res_config_odbc.so
EOF;
- $script_file .= $add_modules_settings;
- file_put_contents($script, $script_file, LOCK_EX);
- }
+ $script_file .= $add_modules_settings;
+ file_put_contents($script, $script_file, LOCK_EX);
}
+ }
+
+ // Replace general SIP settings as a newbie hint to start configuration
+ $script = '/conf/asterisk/sip.conf';
+ if (file_exists($script)) {
+ $script_file = file_get_contents($script);
+ // Strenghten a couple of security settings, and predefine codecs in the default SIP configuration
+ // First check if already added...
+ if (strpos($script_file, 'pfSense') === false) {
+ $pattern[0] = '/;allowguest\S+/';
+ $replace[0] = 'allowguest=no ;by pfSense ;';
+ $pattern[1] = '/;alwaysauthreject/';
+ $replace[1] = 'alwaysauthreject=yes ;by pfSense ;';
+ $pattern[2] = '/; jbenable/';
+ $replace[2] = 'jbenable=yes ;by pfSense ;';
+ $pattern[3] = '/(First disallow all codecs)/';
+ $replace[3] = "$1\n;The following general settings usually work on pfSense boxes (note: please do not remove this comment line).\ndisallow=all ;by pfSense\nallow=g729\nallow=gsm\nallow=ulaw\nallow=alaw\n\n";
+ $script_file = preg_replace($pattern, $replace, $script_file);
+ file_put_contents($script, $script_file, LOCK_EX);
+ }
+
+ // First check if already added...
+ if (strpos($script_file, 'demo extension for pfSense') === false) {
+ $add_demo_extension = <<<EOF
- //replace general SIP settings as a newbie hint to start configuration
- $script='/conf/asterisk/sip.conf';
- if (file_exists($script)){
- $script_file=file_get_contents($script);
- //strenghten a couple of security settings, and predefine codecs in the default SIP configuration
- if (strpos($script_file,'pfSense') === false) { //first check if already added...
- $pattern[0]='/;allowguest\S+/';
- $replace[0]='allowguest=no ;by pfSense ;';
- $pattern[1]='/;alwaysauthreject/';
- $replace[1]='alwaysauthreject=yes ;by pfSense ;';
- $pattern[2]='/; jbenable/';
- $replace[2]='jbenable=yes ;by pfSense ;';
- $pattern[3]='/(First disallow all codecs)/';
- $replace[3]="$1\n;The following general settings usually work on pfSense boxes (note: please do not remove this comment line).\ndisallow=all ;by pfSense\nallow=g729\nallow=gsm\nallow=ulaw\nallow=alaw\n\n";
- $script_file=preg_replace($pattern,$replace,$script_file);
- file_put_contents($script, $script_file, LOCK_EX);
- }
-
- if (strpos($script_file,'demo extension for pfSense') === false) { //first check if already added...
- $add_demo_extension = <<<EOF
-
[301]
;demo extension for pfSense
type=friend
@@ -376,51 +369,50 @@ context=default
EOF;
$script_file .= $add_demo_extension;
file_put_contents($script, $script_file, LOCK_EX);
- }
}
+ }
- $script='/usr/local/etc/rc.d/asterisk';
- if (file_exists($script)){
- $script_file=file_get_contents($script);
- if (preg_match('/NO/',$script_file)){
- $script_file=preg_replace("/NO/","YES",$script_file);
- $script_file=preg_replace("/core stop now'/","core stop now'\n killall \$name",$script_file);
-
- //create the /var subdirs for the writable area in RAM
- if (strpos($script_file,'pfSense') === false) { //first check if already added...
- $writable_area = <<< EOF
-# Create paths in pfSense's volatile area if they don't exist (note: please do not remove this comment line)
+ // Write /usr/local/etc/rc.d/asterisk.sh rc script
+ $asterisk_user = "asterisk";
+ $command = "/usr/local/sbin/asterisk";
+ $command_args = "-n -F -U {$asterisk_user}";
+ $start = <<<EOF
+
+# Create the /var subdirs for the writable area in ramfs
for a in db spool run log
do
if [ ! -d /var/\$a/asterisk ]; then
- mkdir -p /var/\$a/asterisk
- chown -R asterisk:asterisk /var/\$a/asterisk
- chmod -R g+w /var/\$a/asterisk
+ mkdir -p /var/\$a/asterisk
+ chown -R asterisk:asterisk /var/\$a/asterisk
+ chmod -R g+w /var/\$a/asterisk
fi
done
if [ ! -d /var/log/asterisk/cdr-csv ]; then
- mkdir -p /var/log/asterisk/cdr-csv
- chown -R asterisk:asterisk /var/log/asterisk/cdr-csv
- chmod -R g+w /var/log/asterisk/cdr-csv
+ mkdir -p /var/log/asterisk/cdr-csv
+ chown -R asterisk:asterisk /var/log/asterisk/cdr-csv
+ chmod -R g+w /var/log/asterisk/cdr-csv
fi
+{$command} {$command_args}
+
EOF;
- $script_file .= $writable_area;
- }
- file_put_contents($script, $script_file, LOCK_EX);
- }
- chmod ($script,0755);
- mwexec("$script stop");
- mwexec_bg("$script start");
- }
-
- //prepare backup for factory defaults restoring feature
+
+ $stop = "{$command} -nqrx 'core stop now'\n\t";
+ $stop .= "/usr/bin/killall asterisk";
+
+ write_rcfile(array(
+ 'file' => 'asterisk.sh',
+ 'start' => $start,
+ 'stop' => $stop ));
+
+ restart_service("asterisk");
+
+ // Prepare backup for factory defaults restoring feature
if (!file_exists("/conf.default/asterisk_factory_defaults_config.tgz")) {
- system("cd /conf/asterisk/ && tar czf /conf.default/asterisk_factory_defaults_config.tgz *");
+ system("cd /conf/asterisk/ && /usr/bin/tar czf /conf.default/asterisk_factory_defaults_config.tgz *");
}
-
- //mount filesystem readonly
+
conf_mount_ro();
}
diff --git a/config/asterisk/asterisk.xml b/config/asterisk/asterisk.xml
index d5fb3161..2eef359f 100644
--- a/config/asterisk/asterisk.xml
+++ b/config/asterisk/asterisk.xml
@@ -2,76 +2,71 @@
<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
<packagegui>
- <copyright>
- <![CDATA[
-/* ========================================================================== */
+ <copyright>
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- asterisk.xml
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2012 Marcello Coutinho
- All rights reserved.
+ asterisk.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2012 Marcello Coutinho
+ Copyright (C) 2015 ESF, LLC
+ All rights reserved.
*/
-/* ========================================================================== */
+/* ====================================================================================== */
/*
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
- ]]>
- </copyright>
- <description>Asterisk status pacakge</description>
- <requirements>Asterisk 1.8.x</requirements>
- <faq>Currently there are no FAQ items provided.</faq>
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+/* ====================================================================================== */
+ ]]>
+ </copyright>
<name>asterisk</name>
- <version>0.3.1</version>
+ <version>0.3.2</version>
<title>asterisk</title>
<include_file>/usr/local/pkg/asterisk.inc</include_file>
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/asterisk.inc</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/asterisk_calls.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/asterisk_edit_file.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/asterisk_log.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/asterisk_cmd.php</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/shortcuts/</prefix>
- <chmod>0755</chmod>
<item>https://packages.pfsense.org/packages/config/asterisk/pkg_asterisk.inc</item>
</additional_files_needed>
<menu>
@@ -82,26 +77,16 @@
</menu>
<service>
<name>asterisk</name>
- <rcfile>asterisk</rcfile>
+ <rcfile>asterisk.sh</rcfile>
<executable>asterisk</executable>
- <description><![CDATA[Asterisk VoIP telephony]]></description>
+ <description>Asterisk VoIP Telephony</description>
</service>
- <tabs>
- </tabs>
- <fields>
- </fields>
<custom_php_install_command>
asterisk_install();
</custom_php_install_command>
<custom_php_deinstall_command>
asterisk_deinstall();
</custom_php_deinstall_command>
- <custom_php_command_before_form>
- </custom_php_command_before_form>
- <custom_php_validation_command>
- </custom_php_validation_command>
- <custom_delete_php_command>
- </custom_delete_php_command>
<custom_php_resync_config_command>
sync_package_asterisk();
</custom_php_resync_config_command>
diff --git a/config/asterisk/asterisk_calls.php b/config/asterisk/asterisk_calls.php
index 75f24b2f..791b6d85 100644
--- a/config/asterisk/asterisk_calls.php
+++ b/config/asterisk/asterisk_calls.php
@@ -1,14 +1,10 @@
<?php
-/* $Id$ */
/*
- status_asterisk_calls.php
- part of pfSense
- Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
+ asterisk_calls.php
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2013 robi <robreg@zsurob.hu>
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -32,7 +28,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_MODULE: asterisk
*/
@@ -53,127 +49,122 @@ include("head.inc");
$callog = "/var/log/asterisk/cdr-csv/Master.csv";
/* Data input processing */
-$cmd = $_GET['cmd'];
+$cmd = $_GET['cmd'];
$file = $_SERVER["SCRIPT_NAME"];
-$break = Explode('/', $file);
-$pfile = $break[count($break) - 1];
+$break = explode('/', $file);
+$pfile = $break[count($break) - 1];
-if (file_exists($callog))
- switch ($cmd){
+if (file_exists($callog)) {
+ switch ($cmd) {
case "trim":
- $trimres=shell_exec("tail -50 '$callog' > /tmp/trimmed_asterisk.csv && rm '$callog' && mv /tmp/trimmed_asterisk.csv '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
- header( 'Location: asterisk_calls.php?savemsg=Calls+log+trimmed.') ;
- break;
+ $trimres = shell_exec("/usr/bin/tail -n 50 '$callog' > /tmp/trimmed_asterisk.csv && /bin/rm '$callog' && /bin/mv /tmp/trimmed_asterisk.csv '$callog' && /usr/sbin/chown asterisk:asterisk '$callog' && /bin/chmod g+w '$callog'");
+ header('Location: asterisk_calls.php?savemsg=Calls+log+trimmed.');
+ break;
case "clear":
- $trimres=shell_exec("rm '$callog' && touch '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
- header( 'Location: asterisk_calls.php?savemsg=Calls+log+cleared.') ;
- break;
+ $trimres=shell_exec("/bin/rm '$callog' && /usr/bin/touch '$callog' && /usr/sbin/chown asterisk:asterisk '$callog' && /bin/chmod g+w '$callog'");
+ header('Location: asterisk_calls.php?savemsg=Calls+log+cleared.');
+ break;
case "download":
- // session_cache_limiter('none'); //*Use before session_start()
- // session_start();
-
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
- header('Content-Disposition: attachment; filename='.basename($callog));
+ header('Content-Disposition: attachment; filename=' . basename($callog));
header('Content-Transfer-Encoding: binary');
- header('Expires: 0');
- header('Cache-Control: must-revalidate');
- header('Pragma: public');
+ header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
+ header('Cache-Control: no-cache, must-revalidate');
+ header('Pragma: no-cache');
header('Content-Length: ' . filesize($callog));
ob_clean();
flush();
readfile($callog);
exit;
- break;
+ break;
}
+}
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
- <?php
+<?php include("fbegin.inc"); ?>
+<?php
$savemsg = $_GET["savemsg"];
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg);
}
+?>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr><td>
+ <?php
+ $tab_array = array();
+ $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
+ $tab_array[1] = array(gettext("Calls"), true, "asterisk_calls.php");
+ $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
+ $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
+ display_top_tabs($tab_array);
?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <?php
- $tab_array = array();
- $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
- $tab_array[1] = array(gettext("Calls"), true, "asterisk_calls.php");
- $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
- $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
- display_top_tabs($tab_array);
- ?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <?php
- if (file_exists($callog))
- $file_handle = fopen($callog, "r");
- ?>
- <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td colspan="6" class="listtopic">Last 50 Asterisk calls</td>
- </tr>
- <tr>
- <td nowrap class="listhdrr"><?=gettext("From");?></td>
- <td nowrap class="listhdrr"><?=gettext("To");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Start");?></td>
- <td nowrap class="listhdrr"><?=gettext("End");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Duration");?></a></td>
- <td nowrap class="listhdrr"><?=gettext("Status");?></td>
- </tr>
- <?php
- $out = '';
- if (file_exists($callog)){
- while (!feof($file_handle) ) {
- $lin = fgetcsv($file_handle, 102400);
- if ($lin[12] != "") {
- $out = "<tr>" . $out;
- $out = "<td class='listlr'>" . utf8_decode(str_replace('"', '', $lin[4])) . "</td><td class='listlr'>" . $lin[2] . "</td><td class='listlr'>" . $lin[9] . "</td><td class='listlr'>" . $lin[11] . "</td><td class='listlr'>" . gmdate("G:i:s", $lin[12]) . "</td><td class='listlr'>" . $lin[14] . "</td>" . $out;
- $out = "</tr>" . $out;
- }
- }
- fclose($file_handle);
- }
- echo $out;
- echo "<tr><td colspan='6'><a href='$pfile?cmd=download'><input type='button' name='command' value='Download' class='formbtn'></a>";
- echo "<a href='$pfile?cmd=trim'><input type='button' name='command' value='Trim log' class='formbtn'></a>";
- echo "<a href='$pfile?cmd=clear'><input type='button' name='command' value='Clear log' class='formbtn'></a></td></tr>";
- ?>
- </table>
- </div>
- </td>
- </tr>
- </table>
-
-<p/>
+</td></tr>
+
+<tr><td>
+ <div id="mainarea">
+ <?php
+ if (file_exists($callog)) {
+ $file_handle = fopen($callog, "r");
+ }
+ ?>
+ <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="6" class="listtopic">Last 50 Asterisk calls</td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("From");?></td>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("To");?></td>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("Start");?></td>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("End");?></td>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("Duration");?></td>
+ <td nowrap="nowrap" class="listhdrr"><?=gettext("Status");?></td>
+ </tr>
+ <?php
+ $out = '';
+ if (file_exists($callog)) {
+ while (!feof($file_handle)) {
+ $lin = fgetcsv($file_handle, 102400);
+ if ($lin[12] != "") {
+ $out = "<tr>" . $out;
+ $out = "<td class='listlr'>" . utf8_decode(str_replace('"', '', $lin[4])) . "</td><td class='listlr'>" . $lin[2] . "</td><td class='listlr'>" . $lin[9] . "</td><td class='listlr'>" . $lin[11] . "</td><td class='listlr'>" . gmdate("G:i:s", $lin[12]) . "</td><td class='listlr'>" . $lin[14] . "</td>" . $out;
+ $out = "</tr>" . $out;
+ }
+ }
+ fclose($file_handle);
+ }
+ echo $out;
+ echo "<tr><td colspan='6'><a href='$pfile?cmd=download'><input type='button' name='command' value='Download' class='formbtn' /></a>";
+ echo "<a href='$pfile?cmd=trim'><input type='button' name='command' value='Trim log' class='formbtn' /></a>";
+ echo "<a href='$pfile?cmd=clear'><input type='button' name='command' value='Clear log' class='formbtn' /></a></td></tr>";
+ ?>
+ </table>
+ </div>
+</td></tr>
+</table>
+
+<br />
<span class="vexpl">
<span class="red">
<strong><?=gettext("Notes:");?><br /></strong>
</span>
- <?=gettext("Listed in reverse order (latest on top).");?> <br>
- <?=gettext("Duration includes ringing time.");?> <br>
+ <?=gettext("Listed in reverse order (latest on top).");?> <br />
+ <?=gettext("Duration includes ringing time.");?> <br />
<?=gettext("Trim keeps the last 50 entries.");?>
<?
-if ($g['platform'] == "nanobsd")
- echo "<br>This log may be lost when rebooting the system.";
+if ($g['platform'] == "nanobsd") {
+ echo "<br />This log may be lost when rebooting the system.";
+}
?>
-
-
</span>
-
<?php include("fend.inc"); ?>
</body>
+</html>
diff --git a/config/asterisk/asterisk_cmd.php b/config/asterisk/asterisk_cmd.php
index da684cde..5ba1b460 100644
--- a/config/asterisk/asterisk_cmd.php
+++ b/config/asterisk/asterisk_cmd.php
@@ -1,14 +1,10 @@
<?php
-/* $Id$ */
/*
- status_asterisk.php
- part of pfSense
- Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
+ asterisk_cmd.php
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2013 robi <robreg@zsurob.hu>
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -32,7 +28,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_MODULE: asterisk
*/
@@ -56,73 +52,75 @@ include("head.inc");
<?php
/* Data input processing */
-$cmd = $_GET['cmd'];
-$cmd = str_replace("+", " ", $cmd);
+$cmd = $_GET['cmd'];
+$cmd = str_replace("+", " ", $cmd);
if ($cmd == "") {
$cmd = "core show settings";
}
$file = $_SERVER["SCRIPT_NAME"];
-$break = Explode('/', $file);
-$pfile = $break[count($break) - 1];
-
+$break = explode('/', $file);
+$pfile = $break[count($break) - 1];
?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr><td>
+ <?php
+ $tab_array = array();
+ $tab_array[0] = array(gettext("Commands"), true, "asterisk_cmd.php");
+ $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
+ $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
+ $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
+ display_top_tabs($tab_array);
+ ?>
+</td></tr>
+
+<tr><td>
+ <div id="mainarea">
+ <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr><td class="listtopic">
+ <table>
+ <tr>
+ <?php
+ /* Print command buttons */
+ echo "<td align='center'><a href='$pfile?cmd=sip+show+registry'><input type='button' name='command' value='SIP Registry' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=sip+show+peers'><input type='button' name='command' value='SIP Peers' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=sip+show+channels'><input type='button' name='command' value='SIP Channels' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+show+channels'><input type='button' name='command' value='Channels' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+show+codecs+audio'><input type='button' name='command' value='Codecs' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+show+translation+recalc+10'><input type='button' name='command' value='Translation' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=sip+show+settings'><input type='button' name='command' value='SIP Settings' class='formbtns' style='width: 100px' /></a></td>";
+ ?>
+ </tr>
+ <tr>
+ <?php
+ echo "<td align='center'><a href='$pfile?cmd=sip+reload'><input type='button' name='command' value='Reload SIP' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=dialplan+reload'><input type='button' name='command' value='Reload Extensions' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+reload'><input type='button' name='command' value='Reload Core' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+show+uptime'><input type='button' name='command' value='Uptime' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='center'><a href='$pfile?cmd=core+restart+now'><input type='button' name='command' value='Restart Asterisk' class='formbtns' style='width: 100px' /></a></td>";
+ echo "<td align='right' colspan='2'><form name='input' action='$pfile' method='get'><input type='text' name='cmd' style='width: 145px' /><input type='submit' value='SEND' class='formbtns' style='width: 50px' /></form></td>";
+ ?>
+ </tr>
+ </table>
+ </td></tr>
+ <tr valign="top">
+ <td class="listlr" nowrap="nowrap">
<?php
- $tab_array = array();
- $tab_array[0] = array(gettext("Commands"), true, "asterisk_cmd.php");
- $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
- $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
- $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
- display_top_tabs($tab_array);
+ /* Run commands and print results */
+ $asterisk_command = shell_exec("/usr/local/sbin/asterisk -rx '$cmd'");
+ echo "<pre style='font-size: 11px; background: white'>";
+ echo $asterisk_command;
+ echo "</pre>";
?>
</td>
</tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td class="listtopic">
- <table><tr>
- <?php
- /* Print command buttons */
- echo "<td align='center'><a href='$pfile?cmd=sip+show+registry'><input type='button' name='command' value='SIP Registry' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=sip+show+peers'><input type='button' name='command' value='SIP Peers' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=sip+show+channels'><input type='button' name='command' value='SIP Channels' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+show+channels'><input type='button' name='command' value='Channels' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+show+codecs+audio'><input type='button' name='command' value='Codecs' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+show+translation+recalc+10'><input type='button' name='command' value='Translation' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=sip+show+settings'><input type='button' name='command' value='SIP Settings' class='formbtns' style='width: 100px'></a></td>";
- echo "</tr><tr>";
- //echo "<td></td>";
- echo "<td align='center'><a href='$pfile?cmd=sip+reload'><input type='button' name='command' value='Reload SIP' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=dialplan+reload'><input type='button' name='command' value='Reload Extensions' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+reload'><input type='button' name='command' value='Reload Core' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+show+uptime'><input type='button' name='command' value='Uptime' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='center'><a href='$pfile?cmd=core+restart+now'><input type='button' name='command' value='Restart Asterisk' class='formbtns' style='width: 100px'></a></td>";
- echo "<td align='right' colspan='2'><form name='input' action='$pfile' method='get'><input type='text' name='cmd' style='width: 145px'><input type='submit' value='SEND' class='formbtns' style='width: 50px'></form> </td>";
- ?>
- </tr></table>
- </td>
- </tr>
- <tr valign="top">
- <td class="listlr" nowrap>
- <?php
- /* Run commands and print results */
- $asterisk_command=shell_exec("asterisk -rx '$cmd'");
- echo "<pre style='font-size:11px; background:white'>";
- echo $asterisk_command;
- echo "</pre>";
- ?>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
+ </table>
+ </div>
+</td></tr>
+</table>
+
<?php include("fend.inc"); ?>
+</body>
+</html>
diff --git a/config/asterisk/asterisk_edit_file.php b/config/asterisk/asterisk_edit_file.php
index 1c992d26..353ecd07 100644
--- a/config/asterisk/asterisk_edit_file.php
+++ b/config/asterisk/asterisk_edit_file.php
@@ -1,8 +1,10 @@
<?php
/*
- edit.php
- Copyright (C) 2004, 2005 Scott Ullrich
+ asterisk_edit_file.php
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2013 robi <robreg@zsurob.hu>
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -27,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
- pfSense_MODULE: shell
+ pfSense_MODULE: asterisk
*/
##|+PRIV
@@ -37,21 +39,19 @@
##|*MATCH=asterisk_edit_file.php*
##|-PRIV
-$pgtitle = array(gettext("Status"),gettext("Asterisk configuration files"));
require("guiconfig.inc");
-
$backup_dir = "/conf";
$backup_filename = "asterisk_config.bak.tgz";
$backup_path = "{$backup_dir}/{$backup_filename}";
$files_dir = "/conf/asterisk";
$host = "{$config['system']['hostname']}.{$config['system']['domain']}";
-$downname = "asterisk-config-{$host}-".date("YmdHis").".bak.tgz"; //put the date in the filename
+// Put the date in the filename
+$downname = "asterisk-config-{$host}-" . date("YmdHis") . ".bak.tgz";
if (($_GET['a'] == "download") && $_GET['t'] == "backup") {
conf_mount_rw();
-// system("cd {$files_dir} && tar czf {$backup_path} *");
- system("cd {$files_dir} && tar czf {$backup_path} --exclude 'dist/*' --exclude dist *");
+ system("cd {$files_dir} && /usr/bin/tar czf {$backup_path} --exclude 'dist/*' --exclude dist *");
conf_mount_ro();
}
@@ -63,8 +63,8 @@ if (($_GET['a'] == "download") && file_exists("{$backup_path}")) {
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=\"{$downname}\"");
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Content-Length: " . filesize("{$backup_path}"));
fpassthru($fd);
exit;
@@ -72,40 +72,38 @@ if (($_GET['a'] == "download") && file_exists("{$backup_path}")) {
if ($_GET['a'] == "other") {
if ($_GET['t'] == "restore") {
- //extract files to $files_dir (/conf/asterisk)
+ // Extract files to $files_dir (/conf/asterisk)
if (file_exists($backup_path)) {
- //echo "The file $filename exists";
conf_mount_rw();
- exec("tar -xzC {$files_dir} -f {$backup_path} 2>&1", $sysretval);
+ exec("/usr/bin/tar -xzC {$files_dir} -f {$backup_path} 2>&1", $sysretval);
$savemsg = "Backup has been restored, please restart Asterisk now " . $sysretval[1];
- system("chmod -R 644 {$files_dir}/*");
- header( 'Location: asterisk_edit_file.php?savemsg=' . $savemsg ) ;
+ system("/bin/chmod -R 644 {$files_dir}/*");
+ header('Location: asterisk_edit_file.php?savemsg=' . $savemsg);
conf_mount_ro();
} else {
- header( 'Location: asterisk_edit_file.php?savemsg=Restore+failed.+Backup+file+not+found.' ) ;
+ header('Location: asterisk_edit_file.php?savemsg=Restore+failed.+Backup+file+not+found.');
}
exit;
}
if ($_GET['t'] == "factrest") {
- //extract files to $files_dir (/conf/asterisk)
+ // Extract files to $files_dir (/conf/asterisk)
if (file_exists('/conf.default/asterisk_factory_defaults_config.tgz')) {
- //echo "The file $filename exists";
conf_mount_rw();
- exec("tar -xzC {$files_dir} -f /conf.default/asterisk_factory_defaults_config.tgz 2>&1", $sysretval);
+ exec("/usr/bin/tar -xzC {$files_dir} -f /conf.default/asterisk_factory_defaults_config.tgz 2>&1", $sysretval);
$savemsg = "Factory configuration restored, please restart Asterisk now " . $sysretval[1];
- system("chmod -R 644 {$files_dir}/*");
- header( 'Location: asterisk_edit_file.php?savemsg=' . $savemsg ) ;
+ system("/bin/chmod -R 644 {$files_dir}/*");
+ header('Location: asterisk_edit_file.php?savemsg=' . $savemsg);
conf_mount_ro();
}
exit;
}
if ($_GET['t'] == "deldist") {
- //delete dist directory from $files_dir/dist (/conf/asterisk/dist)
+ // Delete dist directory from $files_dir/dist (/conf/asterisk/dist)
if (file_exists($files_dir . "/dist")) {
conf_mount_rw();
- exec("rm -r {$files_dir}/dist 2>&1", $sysretval);
+ exec("/bin/rm -r {$files_dir}/dist 2>&1", $sysretval);
$savemsg = "Deleted dist files " . $sysretval[1];
- header( 'Location: asterisk_edit_file.php?savemsg=' . $savemsg ) ;
+ header('Location: asterisk_edit_file.php?savemsg=' . $savemsg);
conf_mount_ro();
}
exit;
@@ -114,53 +112,55 @@ if ($_GET['a'] == "other") {
if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
$upfilnam = $_FILES['ulfile']['name'];
- $upfiltim = strtotime(str_replace(".bak.tgz","",end(explode("-",$upfilnam))));
+ $upfiltim = strtotime(str_replace(".bak.tgz", "", end(explode("-", $upfilnam))));
conf_mount_rw();
move_uploaded_file($_FILES['ulfile']['tmp_name'], "{$backup_path}");
- $savemsg = "Uploaded ". htmlentities($_FILES['ulfile']['name']) . " file as " . $backup_path . "." ;
- system('chmod -R 644 {$backup_path}');
- if ($upfiltim) { //take the date from the filename and update modified time accordingly
+ $savemsg = "Uploaded " . htmlentities($_FILES['ulfile']['name']) . " file as " . $backup_path . ".";
+ system("/bin/chmod -R 644 {$backup_path}");
+ // Take the date from the filename and update modified time accordingly
+ if ($upfiltim) {
touch($backup_path, $upfiltim);
}
unset($_POST['txtCommand']);
conf_mount_ro();
- header( 'Location: asterisk_edit_file.php?savemsg=' . $savemsg ) ;
+ header('Location: asterisk_edit_file.php?savemsg=' . $savemsg);
}
-if($_REQUEST['action']) {
+if ($_REQUEST['action']) {
switch($_REQUEST['action']) {
case 'load':
- if(strlen($_REQUEST['file']) < 1) {
+ if (strlen($_REQUEST['file']) < 1) {
echo "|5|" . gettext("No file name specified") . ".|";
- } elseif(is_dir($_REQUEST['file'])) {
+ } elseif (is_dir($_REQUEST['file'])) {
echo "|4|" . gettext("Loading a directory is not supported") . ".|";
- } elseif(! is_file($_REQUEST['file'])) {
+ } elseif (! is_file($_REQUEST['file'])) {
echo "|3|" . gettext("File does not exist or is not a regular file") . ".|";
} else {
$data = file_get_contents(urldecode($_REQUEST['file']));
- if($data === false) {
+ if ($data === false) {
echo "|1|" . gettext("Failed to read file") . ".|";
} else {
- echo "|0|{$_REQUEST['file']}|{$data}|";
+ echo "|0|{$_REQUEST['file']}|{$data}|";
}
}
exit;
case 'save':
- if(strlen($_REQUEST['file']) < 1) {
+ if (strlen($_REQUEST['file']) < 1) {
echo "|" . gettext("No file name specified") . ".|";
} else {
conf_mount_rw();
$_REQUEST['data'] = str_replace("\r", "", base64_decode($_REQUEST['data']));
$ret = file_put_contents($_REQUEST['file'], $_REQUEST['data']);
conf_mount_ro();
- if($_REQUEST['file'] == "/conf/config.xml" || $_REQUEST['file'] == "/cf/conf/config.xml") {
- if(file_exists("/tmp/config.cache"))
+ if ($_REQUEST['file'] == "/conf/config.xml" || $_REQUEST['file'] == "/cf/conf/config.xml") {
+ if (file_exists("/tmp/config.cache")) {
unlink("/tmp/config.cache");
+ }
disable_security_checks();
}
- if($ret === false) {
+ if ($ret === false) {
echo "|" . gettext("Failed to write file") . ".|";
- } elseif($ret <> strlen($_REQUEST['data'])) {
+ } elseif ($ret <> strlen($_REQUEST['data'])) {
echo "|" . gettext("Error while writing file") . ".|";
} else {
echo "|" . gettext("File successfully saved") . ".|";
@@ -170,10 +170,10 @@ if($_REQUEST['action']) {
}
exit;
}
+
$shortcut_section = "asterisk";
+$pgtitle = array(gettext("Status"), gettext("Asterisk configuration files"));
require("head.inc");
-outputJavaScriptFileInline("filebrowser/browser.js");
-outputJavaScriptFileInline("javascript/base64.js");
?>
@@ -181,21 +181,34 @@ outputJavaScriptFileInline("javascript/base64.js");
<?php include("fbegin.inc"); ?>
<?php
-$savemsg = $_GET["savemsg"];
-if ($savemsg) {
- print_info_box($savemsg);
-}
+ $savemsg = $_GET["savemsg"];
+ if ($savemsg) {
+ print_info_box($savemsg);
+ }
?>
-<script type="text/javascript">
+<script type="text/javascript">
+//<![CDATA[
+<?php include("filebrowser/browser.js"); ?>
+//]]>
+</script>
+
+<script type="text/javascript">
+//<![CDATA[
+<?php include("javascript/base64.js"); ?>
+//]]>
+</script>
+
+<script type="text/javascript">
+//<![CDATA[
function loadFile() {
$("fileStatus").innerHTML = "<?=gettext("Loading file"); ?> ...";
Effect.Appear("fileStatusBox", { duration: 0.5 });
new Ajax.Request(
"<?=$_SERVER['SCRIPT_NAME'];?>", {
- method: "post",
- postBody: "action=load&file=" + $("fbTarget").value,
+ method: "post",
+ postBody: "action=load&file=" + $("fbTarget").value,
onComplete: loadComplete
}
);
@@ -209,10 +222,10 @@ if ($savemsg) {
if(values.shift() == "0") {
var file = values.shift();
$("fileStatus").innerHTML = "<?=gettext("File successfully loaded"); ?>.";
- $("fileContent").value = values.join("|");
+ $("fileContent").value = values.join("|");
var lang = "none";
- if(file.indexOf(".php") > 0) lang = "php";
+ if(file.indexOf(".php") > 0) lang = "php";
else if(file.indexOf(".inc") > 0) lang = "php";
else if(file.indexOf(".xml") > 0) lang = "xml";
else if(file.indexOf(".js" ) > 0) lang = "js";
@@ -229,14 +242,14 @@ if ($savemsg) {
function saveFile(file) {
$("fileStatus").innerHTML = "<?=gettext("Saving file"); ?> ...";
Effect.Appear("fileStatusBox", { duration: 0.5 });
-
+
var fileContent = Base64.encode($("fileContent").value);
fileContent = fileContent.replace(/\+/g,"%2B");
-
+
new Ajax.Request(
"<?=$_SERVER['SCRIPT_NAME'];?>", {
- method: "post",
- postBody: "action=save&file=" + $("fbTarget").value +
+ method: "post",
+ postBody: "action=save&file=" + $("fbTarget").value +
"&data=" + fileContent,
onComplete: function(req) {
var values = req.responseText.split("|");
@@ -246,7 +259,7 @@ if ($savemsg) {
);
}
-
+
function ckrest() {
if(document.getElementById('ckrest').checked==true) {
@@ -263,188 +276,174 @@ if ($savemsg) {
document.getElementById('deldistdire').disabled=true;
}
}
-
-
+
+//]]>
</script>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <?php
- $tab_array = array();
- $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
- $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
- $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
- $tab_array[3] = array(gettext("Edit configuration"), true, "asterisk_edit_file.php");
- display_top_tabs($tab_array);
- ?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
-
- <!-- backup options -->
- <div style="background:#eeeeee;">
- <div class="vexpl" style="padding-left:15px;">
- <br />
- <table width='98%' cellpadding='0' cellspacing='0' border='0'>
- <tr>
- <td width='80%'>
- <b>Backup / Restore</b>
- The 'Backup' button will tar gzip asterisk configuration files to <? echo $backup_path; ?> it then offers it to download.<br>
- The 'Restore' button will be visible only if the <? echo $backup_path; ?> backup file exists.<br>
- You can upload a backup file to the system, if one already exists at <? echo $backup_path; ?>, it will be overwritten.
- <br />
- </td>
- <td width='20%' valign='middle' align='right'>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr><td>
+ <?php
+ $tab_array = array();
+ $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
+ $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
+ $tab_array[2] = array(gettext("Log"), false, "asterisk_log.php");
+ $tab_array[3] = array(gettext("Edit configuration"), true, "asterisk_edit_file.php");
+ display_top_tabs($tab_array);
+ ?>
+</td></tr>
+
+<tr><td>
+ <div id="mainarea">
+ <!-- backup options -->
+ <div style="background:#eeeeee;">
+ <div class="vexpl" style="padding-left:15px;"><br />
+ <table width='98%' cellpadding='0' cellspacing='0' border='0'>
+ <tr>
+ <td width='80%'>
+ <strong>Backup / Restore</strong>
+ The 'Backup' button will tar gzip asterisk configuration files to <? echo $backup_path; ?> it then offers it to download.<br />
+ The 'Restore' button will be visible only if the <? echo $backup_path; ?> backup file exists.<br />
+ You can upload a backup file to the system, if one already exists at <? echo $backup_path; ?>, it will be overwritten.<br />
+ </td>
+ <td width='20%' valign='middle' align='right'>
<?php
- echo " <input type='button' value='Backup' onclick=\"document.location.href='asterisk_edit_file.php?a=download&t=backup';\" />\n";
- if (file_exists($backup_path)) {
- echo " <input type='button' value='Restore' onclick=\"document.location.href='asterisk_edit_file.php?a=other&t=restore';\" />\n";
- }
+ echo "<input type='button' value='Backup' onclick=\"document.location.href='asterisk_edit_file.php?a=download&amp;t=backup';\" />\n";
+ if (file_exists($backup_path)) {
+ echo "<input type='button' value='Restore' onclick=\"document.location.href='asterisk_edit_file.php?a=other&amp;t=restore';\" />\n";
+ }
?>
- </td>
- </tr></table><br>
- <table width='98%' cellpadding='0' cellspacing='0' border='0'>
- <tr>
- <td width='20%' valign='middle' align='left'>
+ </td>
+ </tr>
+ </table>
+ <br />
+ <table width='98%' cellpadding='0' cellspacing='0' border='0'>
+ <tr>
+ <td width='20%' valign='middle' align='left'>
<?php
if (file_exists($backup_path)) {
- echo $backup_filename . " date:<br>" . date ("Y F d H:i:s.", filemtime($backup_path));
+ echo $backup_filename . " date:<br />" . date ("Y F d H:i:s.", filemtime($backup_path));
}
?>
- </td>
- <td width='80%' valign='middle' align='right'>
- <form action="asterisk_edit_file.php" method="POST" enctype="multipart/form-data" name="frmUpload" onSubmit="">
+ </td>
+ <td width='80%' valign='middle' align='right'>
+ <form action="asterisk_edit_file.php" method="post" enctype="multipart/form-data" name="frmUpload" onsubmit="">
Upload backup file:
- <input name="ulfile" type="file" class="button" id="ulfile">
- <input name="submit" type="submit" class="button" id="upload" value="Upload">
+ <input name="ulfile" type="file" class="button" id="ulfile" />
+ <input name="submit" type="submit" class="button" id="upload" value="Upload" />
</form>
- </td>
- </tr>
- </table><br />
- </div>
- </div>
-
-
-
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabcont" align="center">
-
- <!-- controls -->
- <table width="100%" cellpadding="9" cellspacing="9">
- <tr>
- <td align="center" class="list">
- <?=gettext("Configuration files stored in"); ?>:
- <input type="text" class="formfld file" id="fbTarget" value="<?=gettext($files_dir);?>" size="45" />
- <input type="button" class="formbtn" id="fbOpen" value="<?=gettext('Browse');?>" />
- <!-- <input type="button" class="formbtn" onclick="loadFile();" value="<?=gettext('Load');?>" /> -->
- <input type="button" class="formbtn" onclick="saveFile();" value="<?=gettext('Save');?>" />
- <br />
- </td>
- </tr>
- </table>
-
-
-
- <!-- file status box -->
- <div style="display:none; background:#eeeeee;" id="fileStatusBox">
- <div class="vexpl" style="padding-left:15px;">
- <strong id="fileStatus"></strong>
- </div>
- </div>
-
-
- <!-- filebrowser -->
- <div id="fbBrowser" style="display:none; border:1px dashed gray; width:98%;"></div>
-
- <!-- file viewer/editor -->
- <table width="100%">
- <tr>
- <td valign="top" class="label">
- <div style="background:#eeeeee;" id="fileOutput">
- <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" wrap="off"></textarea>
- </div>
- </td>
- </tr>
- </table>
-
- </td>
- </tr>
- </table>
-
- <script type="text/javascript">
- Event.observe(
- window, "load",
- function() {
- $("fbTarget").focus();
-
- NiftyCheck();
- Rounded("div#fileStatusBox", "all", "#ffffff", "#eeeeee", "smooth");
- }
- );
-
- <?php if($_GET['action'] == "load"): ?>
- Event.observe(
- window, "load",
- function() {
- $("fbTarget").value = "<?=$_GET['path'];?>";
- loadFile();
- }
- );
- <?php endif; ?>
- </script>
-
-
- <div style="background:#eeeeee;">
- <div class="vexpl" style="padding-left:15px;">
- <table width='98%' cellpadding='0' cellspacing='0' border='0'>
- <tr>
- <td width='80%' valign='middle' align='right'><br />
- <?php
- if (file_exists($files_dir . "/dist")) {
- echo "<input name='ckdist' id='ckdist' type='checkbox' onclick='return ckdist();' style='vertical-align:-3px;'>enable <input type='button' value='Delete dist files' name='deldistdire' id='deldistdire' disabled='disabled' onclick=\"document.location.href='asterisk_edit_file.php?a=other&t=deldist';\" />&nbsp;&nbsp;\n";
- }
- if (file_exists("/conf.default/asterisk_factory_defaults_config.tgz")) {
- echo "<input name='ckrest' id='ckrest' type='checkbox' onclick='return ckrest();' style='vertical-align:-3px;'>enable <input type='button' value='Restore to factory defaults' name='restfactdef' id='restfactdef' disabled='disabled' onclick=\"document.location.href='asterisk_edit_file.php?a=other&t=factrest';\" />\n";
- }
- ?>
- <br /></td>
- </tr>
- </table><br />
- </div>
- </div>
-
-
+ </td>
+ </tr>
+ </table>
+ <br />
+ </div>
+ </div>
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr><td class="tabcont" align="center">
+ <!-- controls -->
+ <table width="100%" cellpadding="9" cellspacing="9">
+ <tr>
+ <td align="center" class="list">
+ <?=gettext("Configuration files stored in"); ?>:
+ <input type="text" class="formfld file" id="fbTarget" value="<?=gettext($files_dir);?>" size="45" />
+ <input type="button" class="formbtn" id="fbOpen" value="<?=gettext('Browse');?>" />
+ <input type="button" class="formbtn" onclick="saveFile();" value="<?=gettext('Save');?>" />
+ <br />
+ </td>
+ </tr>
+ </table>
+
+ <!-- file status box -->
+ <div style="display:none; background:#eeeeee;" id="fileStatusBox">
+ <div class="vexpl" style="padding-left:15px;">
+ <strong id="fileStatus"></strong>
</div>
- </td>
- </tr>
- </table>
+ </div>
-<p/>
+ <!-- filebrowser -->
+ <div id="fbBrowser" style="display:none; border:1px dashed gray; width:98%;"></div>
+
+ <!-- file viewer/editor -->
+ <table width="100%">
+ <tr>
+ <td valign="top" class="label">
+ <div style="background:#eeeeee;" id="fileOutput">
+ <textarea id="fileContent" name="fileContent" style="width:100%;" rows="30" cols="65" wrap="off"></textarea>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+
+<script type="text/javascript">
+//<![CDATA[
+ Event.observe(
+ window, "load",
+ function() {
+ $("fbTarget").focus();
+ NiftyCheck();
+ Rounded("div#fileStatusBox", "all", "#ffffff", "#eeeeee", "smooth");
+ }
+ );
+
+ <?php if ($_GET['action'] == "load"): ?>
+ Event.observe(
+ window, "load",
+ function() {
+ $("fbTarget").value = "<?=$_GET['path'];?>";
+ loadFile();
+ }
+ );
+ <?php endif; ?>
+//]]>
+</script>
+
+ <div style="background: #eeeeee;">
+ <div class="vexpl" style="padding-left:15px;">
+ <table width='98%' cellpadding='0' cellspacing='0' border='0'>
+ <tr>
+ <td width='80%' valign='middle' align='right'><br />
+ <?php
+ if (file_exists($files_dir . "/dist")) {
+ echo "<input name='ckdist' id='ckdist' type='checkbox' onclick='return ckdist();' style='vertical-align:-3px;'>enable <input type='button' value='Delete dist files' name='deldistdire' id='deldistdire' disabled='disabled' onclick=\"document.location.href='asterisk_edit_file.php?a=other&amp;t=deldist';\" />&nbsp;&nbsp;\n";
+ }
+ if (file_exists("/conf.default/asterisk_factory_defaults_config.tgz")) {
+ echo "<input name='ckrest' id='ckrest' type='checkbox' onclick='return ckrest();' style='vertical-align:-3px;'>enable <input type='button' value='Restore to factory defaults' name='restfactdef' id='restfactdef' disabled='disabled' onclick=\"document.location.href='asterisk_edit_file.php?a=other&amp;t=factrest';\" />\n";
+ }
+ ?>
+ <br />
+ </td>
+ </tr>
+ </table>
+ <br />
+ </div>
+ </div>
+ </div>
+</td></tr>
+</table>
+
+<br />
<span class="vexpl">
<span class="red">
<strong><?=gettext("Note:");?><br /></strong>
</span>
- <?=gettext("Please back up your Asterisk configuration regularly.");?><br>
+ <?=gettext("Please back up your Asterisk configuration regularly.");?><br />
<?=gettext("It's worth to preserve the automatically generated filename of the downloaded backup file. It contains the backup creation date, which is used when uploading it back to the system.");?>
<?php
- $sipconf=$files_dir . "/sip.conf";
- if (file_exists($sipconf)){
- $sipconf_file=file_get_contents($sipconf);
- if (strpos($sipconf_file,"demo extension for pfSense") !== false) {
+ $sipconf = $files_dir . "/sip.conf";
+ if (file_exists($sipconf)) {
+ $sipconf_file = file_get_contents($sipconf);
+ if (strpos($sipconf_file, "demo extension for pfSense") !== false) {
?><br />
<?=gettext("This Asterisk configuration on pfSense contains two demo SIP accounts, 301 and 302 with password 1234, for you to test functionality. Check sip.conf for more details. These accounts can be safely removed at any time.");?>
<?php
}
- }
+ }
?>
-
</span>
-
+
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/config/asterisk/asterisk_log.php b/config/asterisk/asterisk_log.php
index f4a752d2..44ba8acf 100644
--- a/config/asterisk/asterisk_log.php
+++ b/config/asterisk/asterisk_log.php
@@ -1,15 +1,11 @@
<?php
-/* $Id$ */
/*
- status_asterisk_log.php
- part of pfSense
- Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
- Copyright (C) 2012 robi <robreg@zsurob.hu>
+ asterisk_log.php
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2012 robi <robreg@zsurob.hu>
Copyright (C) 2012 Marcello Coutinho
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -33,7 +29,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
+/*
pfSense_MODULE: asterisk
*/
@@ -51,94 +47,84 @@ $shortcut_section = "asterisk";
include("head.inc");
/* Path to Asterisk log file */
-//if ($g['platform'] == "nanobsd")
-// $log = "/tmp/asterisk.log";
-//else
$log = "/var/log/asterisk/messages";
?>
<?php
/* Data input processing */
-$cmd = $_GET['cmd'];
-//$cmd = str_replace("+", " ", $cmd);
+$cmd = $_GET['cmd'];
+//$cmd = str_replace("+", " ", $cmd);
$file = $_SERVER["SCRIPT_NAME"];
-$break = Explode('/', $file);
-$pfile = $break[count($break) - 1];
+$break = explode('/', $file);
+$pfile = $break[count($break) - 1];
if (file_exists($log)) {
if ($cmd == "trim") {
- $trimres=shell_exec("tail -50 '$log' > /tmp/trimmed_asterisk.log && rm '$log' && mv /tmp/trimmed_asterisk.log '$log' && chown asterisk:asterisk '$log' && chmod g+w '$log'");
- header( 'Location: asterisk_log.php?savemsg=Log+trimmed.') ;
+ $trimres = shell_exec("/usr/bin/tail -n 50 '$log' > /tmp/trimmed_asterisk.log && /bin/rm '$log' && /bin/mv /tmp/trimmed_asterisk.log '$log' && /usr/sbin/chown asterisk:asterisk '$log' && /bin/chmod g+w '$log'");
+ header('Location: asterisk_log.php?savemsg=Log+trimmed.');
}
if ($cmd == "clear") {
- $trimres=shell_exec("rm '$log' && touch '$log' && chown asterisk:asterisk '$log' && chmod g+w '$log'");
- header( 'Location: asterisk_log.php?savemsg=Log+cleared.') ;
+ $trimres = shell_exec("/bin/rm '$log' && /usr/bin/touch '$log' && /usr/sbin/chown asterisk:asterisk '$log' && /bin/chmod g+w '$log'");
+ header('Location: asterisk_log.php?savemsg=Log+cleared.');
}
}
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
- <?php include("fbegin.inc"); ?>
- <?php
+<?php include("fbegin.inc"); ?>
+<?php
$savemsg = $_GET["savemsg"];
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg);
}
+?>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr><td>
+ <?php
+ $tab_array = array();
+ $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
+ $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
+ $tab_array[2] = array(gettext("Log"), true, "asterisk_log.php");
+ $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
+ display_top_tabs($tab_array);
?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <?php
- $tab_array = array();
- $tab_array[0] = array(gettext("Commands"), false, "asterisk_cmd.php");
- $tab_array[1] = array(gettext("Calls"), false, "asterisk_calls.php");
- $tab_array[2] = array(gettext("Log"), true, "asterisk_log.php");
- $tab_array[3] = array(gettext("Edit configuration"), false, "asterisk_edit_file.php");
- display_top_tabs($tab_array);
- ?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td colspan="2" class="listtopic">Last 50 Asterisk log entries</td>
- </tr>
-
- <tr valign="top"><td class="listlr" nowrap>
-
+</td></tr>
+<tr><td>
+ <div id="mainarea">
+ <table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="2" class="listtopic">Last 50 Asterisk log entries</td>
+ </tr>
+ <tr valign="top"><td class="listlr" nowrap="nowrap">
<?php
$showlog_command=shell_exec("tail -50 '$log'");
echo nl2br($showlog_command);
?>
- </td></tr>
+ </td></tr>
<?php
- echo "<tr><td colspan='6'><a href='$pfile?cmd=trim'><input type='button' name='command' value='Trim log' class='formbtn'></a>";
- echo "<a href='$pfile?cmd=clear'><input type='button' name='command' value='Clear log' class='formbtn'></a></td></tr>";
+ echo "<tr><td colspan='6'><a href='$pfile?cmd=trim'><input type='button' name='command' value='Trim log' class='formbtn' /></a>";
+ echo "<a href='$pfile?cmd=clear'><input type='button' name='command' value='Clear log' class='formbtn' /></a></td></tr>";
?>
- </table>
- </div>
- </td>
- </tr>
- </table>
+ </table>
+ </div>
+</td></tr>
+</table>
-<p/>
+<br />
<span class="vexpl">
<span class="red">
<strong><?=gettext("Note:");?><br /></strong>
</span>
<?=gettext("Trim keeps the last 50 lines of the log.");?>
-<?
-if ($g['platform'] == "nanobsd")
- echo "<br>This log may be lost when rebooting the system.";
-?>
-
-
+ <?php
+ if ($g['platform'] == "nanobsd") {
+ echo "<br />This log may be lost when rebooting the system.";
+ }
+ ?>
</span>
<?php include("fend.inc"); ?>
diff --git a/config/asterisk/pkg_asterisk.inc b/config/asterisk/pkg_asterisk.inc
index 129313c4..ad26ee80 100644
--- a/config/asterisk/pkg_asterisk.inc
+++ b/config/asterisk/pkg_asterisk.inc
@@ -8,4 +8,4 @@ $shortcuts['asterisk']['log'] = "asterisk_log.php";
$shortcuts['asterisk']['status'] = "asterisk_cmd.php";
$shortcuts['asterisk']['service'] = "asterisk";
-?> \ No newline at end of file
+?>
diff --git a/config/filemgr/file_manager.php b/config/filemgr/file_manager.php
index 5e858591..1c9edb61 100644
--- a/config/filemgr/file_manager.php
+++ b/config/filemgr/file_manager.php
@@ -193,19 +193,19 @@ if ('ok' == 'ok') {
}
$container .= <<<EOF
-<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\" class=\"list\" width=\"100%\" summary=\"file manager\">
+<table border="0" cellspacing="1" cellpadding="1" class="list" width="100%" summary="file manager">
<tr>
- <th style=\"padding:0;width:18px\">&nbsp;</th>
+ <th style="padding:0; width:18px">&nbsp;</th>
<th>Name</th>
- <th colspan=\"5\">&nbsp;</th>
+ <th colspan="5">&nbsp;</th>
<th>Ext.</th>
<th>Size</th>
<th>Date</th>
<th>Attributes</th>
</tr>
<tr>
- <td style=\"padding:0;width:18px\" title=\"UP one level\"><img width=\"16\" height=\"16\" src=\"rbfmimg/folder.png\" alt=\"F\" {$up_one_level} /></td>
- <td colspan=\"11\"><b title=\"UP one level\"{$up_one_level}>[..]</b></td>
+ <td style="padding:0; width:18px" title="UP one level"><img width="16" height="16" src="rbfmimg/folder.png" alt="F" {$up_one_level} /></td>
+ <td colspan="11"><b title="UP one level"{$up_one_level}>[..]</b></td>
</tr>
EOF;
@@ -231,39 +231,40 @@ EOF;
$use_url = "<img src=\"rbfmimg/ico_use_file_inactive.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL (Inactive!!!)\" />";
}
-
+ $cfe = urlencode($current_folder);
+ $vfe = urlencode($v);
$container .= <<<EOF
<tr>
- <td style=\"padding:0;width:18px\">
- <img width=\"16\" height=\"16\" src=\"rbfmimg/folder.png\" alt=\"Folder\" ondblclick=\"document.location='{$_SERVER['PHP_SELF']}?p=".urlencode($current_folder.$vf)."'\" />
+ <td style="padding:0; width:18px">
+ <img width="16" height="16" src="rbfmimg/folder.png" alt="Folder" ondblclick="document.location='{$_SERVER['PHP_SELF']}?p={$cfe}{$vfe}'" />
</td>
<td>
- <div style=\"padding-top:2px;\" id=\"f{$id}\" ondblclick=\"document.location='{$_SERVER['PHP_SELF']}?p=".urlencode($current_folder.$vf)."'\">
+ <div style="padding-top:2px;" id="f{$id}" ondblclick="document.location='{$_SERVER['PHP_SELF']}?p={$cfe}{$vfe}'">
{$v}
</div>
- <form class=\"rename_field\" id=\"r{$id}\" name=\"r{$id}\" method=\"post\" action=\"rbfminc/rename.php\" target=\"results\" onsubmit=\"this.n.blur(); return false\">
- <input class=\"input_name rename_input\" name=\"n\" type=\"text\" value=\"{$v}\" id=\"rf{$id}\" onblur=\"document.form{$id}.submit(); document.getElementById('f{$id}').style.display = 'block'; document.getElementById('r{$id}').style.display = 'none'; document.getElementById('f{$id}').innerHTML = this.value; document.form{$id}.o.value = this.value;\" />
- <input name=\"cf\" type=\"hidden\" value=\"{$current_folder}\" />
- <input name=\"o\" type=\"hidden\" value=\"{$v}\" />
- <input name=\"t\" type=\"hidden\" value=\"d\" />
- <input name=\"submitS\" type=\"submit\" value=\"submitS\" style='display: none; width:0;height:0' />
+ <form class="rename_field" id="r{$id}" name="r{$id}" method="post" action="rbfminc/rename.php" target="results" onsubmit="this.n.blur(); return false">
+ <input class="input_name rename_input" name="n" type="text" value="{$v}" id="rf{$id}" onblur="document.form{$id}.submit(); document.getElementById('f{$id}').style.display = 'block'; document.getElementById('r{$id}').style.display = 'none'; document.getElementById('f{$id}').innerHTML = this.value; document.form{$id}.o.value = this.value;" />
+ <input name="cf" type="hidden" value="{$current_folder}" />
+ <input name="o" type="hidden" value="{$v}" />
+ <input name="t" type="hidden" value="d" />
+ <input name="submitS" type="submit" value="submitS" style='display: none; width:0; height:0' />
</form>
</td>
<!--<td>{$use_url}</td>-->
<td>{$browser}</td>
<td>&nbsp;</td>
<td>
- <img width=\"16\" height=\"16\" src=\"rbfmimg/ico_rename.png\" alt=\"Rename\" title=\"Rename\" onclick=\" document.getElementById('r{$id}').style.display = 'block'; document.getElementById('f{$id}').style.display = 'none'; document.getElementById('rf{$id}').focus(); document.getElementById('rf{$id}').select()\" />
+ <img width="16" height="16" src="rbfmimg/ico_rename.png" alt="Rename" title="Rename" onclick="document.getElementById('r{$id}').style.display = 'block'; document.getElementById('f{$id}').style.display = 'none'; document.getElementById('rf{$id}').focus(); document.getElementById('rf{$id}').select()" />
</td>
<td>&nbsp;</td>
<td>
- <img width=\"16\" height=\"16\" src=\"rbfmimg/ico_delete.png\" alt=\"D\" title=\"Delete\" onclick=\"if(confirm('Delete folder &quot;{$v}&quot;?') &amp;&amp; confirm('You cannot undo this operation!!!') &amp;&amp; confirm('To delete this folder &quot;{$v}&quot; press OK\\nTo cancel this operation press CANCEL')){document.location = 'file_manager.php?p=".urlencode($current_folder)."&amp;do=delete&amp;file=".urlencode($v)."&amp;type=directory'}\" />
+ <img width="16" height="16" src="rbfmimg/ico_delete.png" alt="D" title="Delete" onclick="if(confirm('Delete folder &quot;{$v}&quot;?') &amp;&amp; confirm('You cannot undo this operation!!!') &amp;&amp; confirm('To delete this folder &quot;{$v}&quot; press OK\\nTo cancel this operation press CANCEL')){document.location='file_manager.php?p={$cf}&amp;do=delete&amp;file={$vfe}&amp;type=directory'}" />
</td>
- <td class=\"srow\">&nbsp;</td>
+ <td class="srow">&nbsp;</td>
<td><b>&lt;DIR&gt;</b></td>
- <td class=\"srow\">{$last_updated_time}</td>
- <td class=\"fileperms\">{$fileperms}</td>
+ <td class="srow">{$last_updated_time}</td>
+ <td class="fileperms">{$fileperms}</td>
</tr>
EOF;
@@ -315,40 +316,42 @@ EOF;
$use_url = "<img src=\"rbfmimg/ico_use_file_inactive.png\" border=\"0\" width=\"16\" height=\"16\" alt=\"U\" title=\"Use URL (Inactive!!!)\" />";
}
+ $cfe = urlencode($current_folder);
+ $vfe = urlencode($v);
$container .= <<<EOF
<tr>
- <td style=\"padding:0;width:18px\">
- <img width=\"16\" height=\"16\" src=\"rbfmimg/{$file_image}\" alt=\"File\" ondblclick=\"document.location = 'rbfminc/download.php?p=".urlencode($current_folder)."&amp;file_name=".urlencode($v)."'\" />
+ <td style="padding:0; width:18px">
+ <img width="16" height="16" src="rbfmimg/{$file_image}" alt="File" ondblclick="document.location='rbfminc/download.php?p={$cfe}&amp;file_name={$vfe}'" />
</td>
<td>
- <div style=\"padding-top:2px;\" id=\"f{$id}\" ondblclick=\"document.location = 'rbfminc/download.php?p=".urlencode($current_folder)."&amp;file_name=".urlencode($v)."'\">
+ <div style="padding-top:2px;" id="f{$id}" ondblclick="document.location='rbfminc/download.php?p={$cfe}&amp;file_name={$vfe}'">
{$v}
</div>
- <form class=\"rename_field\" id=\"r{$id}\" name=\"r{$id}\" method=\"post\" action=\"rbfminc/rename.php\" target=\"results\" onsubmit=\"this.n.blur(); return false\">
- <input name=\"cf\" type=\"hidden\" value=\"{$current_folder}\" />
- <input name=\"o\" type=\"hidden\" value=\"{$v}\" />
- <input name=\"t\" type=\"hidden\" value=\"f\" />
- <input class=\"input_name\" name=\"n\" type=\"text\" value=\"{$v}\" id=\"rf{$id}\" onblur=\"document.form{$id}.submit(); document.getElementById('f{$id}').style.display = 'block'; document.getElementById('r{$id}').style.display = 'none'; document.getElementById('f{$id}').innerHTML = this.value; document.form{$id}.o.value = this.value;\" />
- <input name=\"submitS\" type=\"submit\" value=\"submitS\" style=\"display: none; width:0;height:0\" />
+ <form class="rename_field" id="r{$id}" name="r{$id}" method="post" action="rbfminc/rename.php" target="results" onsubmit="this.n.blur(); return false">
+ <input name="cf" type="hidden" value="{$current_folder}" />
+ <input name="o" type="hidden" value="{$v}" />
+ <input name="t" type="hidden" value="f" />
+ <input class="input_name" name="n" type="text" value="{$v}" id="rf{$id}" onblur="document.form{$id}.submit(); document.getElementById('f{$id}').style.display = 'block'; document.getElementById('r{$id}').style.display = 'none'; document.getElementById('f{$id}').innerHTML = this.value; document.form{$id}.o.value = this.value;" />
+ <input name="submitS" type="submit" value="submitS" style="display: none; width:0;height:0" />
</form>
</td>
<!--<td>{$use_url}</td>-->
<td>{$browser}</td>
<td>
- <a href=\"rbfminc/download.php?p=".urlencode($current_folder)."&amp;file_name=".urlencode($v)."\"><img width=\"16\" height=\"16\" src=\"rbfmimg/ico_download.png\" alt=\"Download\" title=\"Download\" border=\"0\"/></a>
+ <a href="rbfminc/download.php?p={$cfe}&amp;file_name={$vfe}"><img width="16" height="16" src="rbfmimg/ico_download.png" alt="Download" title="Download" border="0" /></a>
</td>
<td>
- <img width=\"16\" height=\"16\" src=\"rbfmimg/ico_rename.png\" alt=\"Rename\" title=\"Rename\" onclick=\"document.getElementById('f{$id}').style.display = 'none'; document.getElementById('r{$id}').style.display = 'block'; document.getElementById('rf{$id}').focus(); document.getElementById('rf{$id}').select()\" />
+ <img width="16" height="16" src="rbfmimg/ico_rename.png" alt="Rename" title="Rename" onclick="document.getElementById('f{$id}').style.display = 'none'; document.getElementById('r{$id}').style.display = 'block'; document.getElementById('rf{$id}').focus(); document.getElementById('rf{$id}').select()" />
</td>
<td>{$edit_file_content}</td>
<td>
- <img width=\"16\" height=\"16\" src=\"rbfmimg/ico_delete.png\" alt=\"D\" title=\"Delete\" onclick=\"if(confirm('Delete file &quot;{$v}&quot;?') &amp;&amp; confirm('You cannot undo this operation!!!') &amp;&amp; confirm('To delete this file &quot;{$v}&quot; press OK\\nTo cancel this operation press CANCEL')){document.location = 'file_manager.php?p=".urlencode($current_folder)."&amp;do=delete&amp;file=".urlencode($v)."&amp;type=file'}\" />
+ <img width="16" height="16" src="rbfmimg/ico_delete.png" alt="D" title="Delete" onclick="if(confirm('Delete file &quot;{$v}&quot;?') &amp;&amp; confirm('You cannot undo this operation!!!') &amp;&amp; confirm('To delete this file &quot;{$v}&quot; press OK\\nTo cancel this operation press CANCEL')){document.location='file_manager.php?p={$cfe}&amp;do=delete&amp;file={$vfe}&amp;type=file'}" />
</td>
- <td class=\"srow\">{$extension}</td>
+ <td class="srow">{$extension}</td>
<td>{$file_size}</td>
- <td class=\"srow\">{$last_updated_time}</td>
- <td class=\"fileperms\">{$fileperms}</td>
+ <td class="srow">{$last_updated_time}</td>
+ <td class="fileperms">{$fileperms}</td>
</tr>
EOF;
@@ -404,14 +407,16 @@ EOF;
if ($_GET['do'] == 'edit') {
$file_content = file_get_contents($current_folder.$_GET['f']);
+ $cfe = urlencode($current_folder);
+ $fce = htmlentities($file_content);
echo <<<EOD
-<form id=\"form_edit\" name=\"form_edit\" method=\"post\" action=\"\" style='width: 670px;margin: 10px auto 0;border-top: 1px #999999 solid'>
- <a name=\"file_edit\"></a>
+<form id="form_edit" name="form_edit" method="post" action="" style='width: 670px;margin: 10px auto 0;border-top: 1px #999999 solid'>
+ <a name="file_edit"></a>
File: <b>{$current_folder}{$_GET['f']}</b><br />
- <textarea name=\"file_content\" id=\"file_content\" cols=\"1\" rows=\"1\" style=\"width: 99%; height: 400px\">".htmlentities ($file_content)."</textarea><br />
- <input name=\"save\" type=\"submit\" value=\"Save\" />
- <input name=\"close\" type=\"button\" value=\"Close file editor\" onclick=\"document.location = 'file_manager.php?f=".urlencode($current_folder)."'\" />
- <input name=\"save_file\" type=\"hidden\" value=\"save_file\" />
+ <textarea name="file_content" id="file_content" cols="1" rows="1" style="width: 99%; height: 400px">{$fce}</textarea><br />
+ <input name="save" type="submit" value="Save" />
+ <input name="close" type="button" value="Close file editor" onclick="document.location='file_manager.php?f={$cfe}'" />
+ <input name="save_file" type="hidden" value="save_file" />
</form>
EOD;
@@ -424,7 +429,7 @@ EOD;
<?php
if ($alert_info) {
echo <<<EOD
- <script type=\"text/javascript\">
+ <script type="text/javascript">
//<![CDATA[
alert('{$alert_info}');
//]]>
@@ -434,7 +439,7 @@ EOD;
if ($redirect) {
echo <<<EOD
- <script type=\"text/javascript\">
+ <script type="text/javascript">
//<![CDATA[
document.location = '{$redirect}';
//]]>
diff --git a/config/filemgr/filemgr.xml b/config/filemgr/filemgr.xml
index fdcf46d0..72ca53d4 100644
--- a/config/filemgr/filemgr.xml
+++ b/config/filemgr/filemgr.xml
@@ -184,4 +184,11 @@
<prefix>/usr/local/www/packages/filemgr/rbfminc/</prefix>
<item>https://packages.pfsense.org/packages/config/filemgr/rbfminc/session.php</item>
</additional_files_needed>
+ <custom_php_deinstall_command>
+ <![CDATA[
+ if (is_dir("/usr/local/www/packages/filemgr")) {
+ mwexec("/bin/rm -rf /usr/local/www/packages/filemgr/");
+ }
+ ]]>
+ </custom_php_deinstall_command>
</packagegui>
diff --git a/config/git/git.xml b/config/git/git.xml
index 6c5254ae..6139fd04 100644
--- a/config/git/git.xml
+++ b/config/git/git.xml
@@ -3,23 +3,28 @@
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
-/* ========================================================================== */
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2013
+ git.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2013-2015 ESF, LLC
All rights reserved.
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -31,14 +36,12 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
]]>
</copyright>
<description>git</description>
- <requirements>None</requirements>
- <faq></faq>
<name>git</name>
- <version>0.0</version>
+ <version>2.2.1</version>
<title>git</title>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/iftop/iftop.xml b/config/iftop/iftop.xml
index 64afbc79..b9dfbe5b 100644
--- a/config/iftop/iftop.xml
+++ b/config/iftop/iftop.xml
@@ -3,23 +3,28 @@
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
-/* ========================================================================== */
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2013
+ iftop.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2013-2015 ESF, LLC
All rights reserved.
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -31,14 +36,12 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
]]>
</copyright>
<description>iftop</description>
- <requirements>None</requirements>
- <faq></faq>
<name>iftop</name>
- <version>0.0</version>
+ <version>0.17</version>
<title>iftop</title>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/ipmitool/ipmitool.xml b/config/ipmitool/ipmitool.xml
index a42baa36..cb6bf385 100644
--- a/config/ipmitool/ipmitool.xml
+++ b/config/ipmitool/ipmitool.xml
@@ -3,23 +3,28 @@
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
-/* ========================================================================== */
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2013
+ ipmitool.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2013-2015 ESF, LLC
All rights reserved.
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -31,14 +36,12 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
]]>
</copyright>
<description>ipmitool</description>
- <requirements>None</requirements>
- <faq></faq>
<name>ipmitool</name>
- <version>0.0</version>
+ <version>1.8.12_5.1</version>
<title>ipmitool</title>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/config/pfblockerng/pfblockerng.sh b/config/pfblockerng/pfblockerng.sh
index fcfbcae1..13e14760 100644
--- a/config/pfblockerng/pfblockerng.sh
+++ b/config/pfblockerng/pfblockerng.sh
@@ -81,7 +81,7 @@ DISK_NAME=`/bin/df /var/db/rrd | /usr/bin/tail -1 | /usr/bin/awk '{print $1;}'`
DISK_TYPE=`/usr/bin/basename ${DISK_NAME} | /usr/bin/cut -c1-2`
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
- /usr/local/bin/php /etc/rc.conf_mount_rw >/dev/null 2>&1
+ /etc/rc.conf_mount_rw >/dev/null 2>&1
if [ ! -d $pfbdbdir ]; then mkdir $pfbdbdir; fi
if [ ! -d $pfsense_alias_dir ]; then mkdir $pfsense_alias_dir; fi
fi
@@ -104,7 +104,7 @@ if [ ! -d $tmpxlsx ]; then mkdir $tmpxlsx; fi
# Exit Function to set mount RO if required before Exiting
exitnow() {
if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
- /usr/local/bin/php /etc/rc.conf_mount_ro >/dev/null 2>&1
+ /etc/rc.conf_mount_ro >/dev/null 2>&1
fi
exit
}
@@ -975,4 +975,4 @@ case $1 in
exitnow
;;
esac
-exitnow \ No newline at end of file
+exitnow
diff --git a/config/siproxd/siproxd.inc b/config/siproxd/siproxd.inc
index 53dc7a2d..50b6e558 100644
--- a/config/siproxd/siproxd.inc
+++ b/config/siproxd/siproxd.inc
@@ -1,8 +1,10 @@
<?php
/*
siproxd.inc
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2006 Scott Ullrich
Copyright (C) 2010 Jim Pingle
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -26,54 +28,51 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-
-if(!function_exists("filter_configure"))
+if (!function_exists("filter_configure")) {
require_once("filter.inc");
+}
require_once("service-utils.inc");
-// Check to find out on which system the package is running
-$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+// Check to find out on which pfSense version the package is running
+global $pfs_version;
+$pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
if ($pfs_version == "2.1" || $pfs_version == "2.2") {
define('SIPROXD', '/usr/pbi/siproxd-' . php_uname("m"));
} else {
define('SIPROXD', '/usr/local');
}
-// End of system check
-function sync_package_sipproxd_users() {
+function sync_package_siproxd_users() {
+ global $g, $config;
conf_mount_rw();
- // put the constant to a variable
- $varSIPROXD = SIPROXD;
-
- global $config;
- $fout = fopen("$varSIPROXD/etc/siproxd_passwd.cfg","w");
+ $siproxd_pwfile = SIPROXD . '/etc/siproxd_passwd.cfg';
+ $fout = fopen($siproxd_pwfile, "w");
fwrite($fout, "# This file was automatically generated by the pfSense\n# package management system.\n\n");
- if($config['installedpackages']['siproxdusers']['config'] != "") {
- foreach($config['installedpackages']['siproxdusers']['config'] as $rowhelper) {
+ if ($config['installedpackages']['siproxdusers']['config'] != "") {
+ foreach ($config['installedpackages']['siproxdusers']['config'] as $rowhelper) {
fwrite($fout, $rowhelper['username'] . " " . $rowhelper['password'] . "\n");
}
}
fclose($fout);
+
conf_mount_ro();
- system("/usr/bin/killall -HUP siproxd");
+ /* Reload settings to sync users */
+ sigkillbypid("{$g['varrun_path']}/siproxd.pid", "HUP");
}
function siproxd_generate_rules($type) {
global $config;
- // put the constant to a variable
- $varSIPROXD = SIPROXD;
-
$siproxd_conf = &$config['installedpackages']['siproxdsettings']['config'][0];
if (!is_service_running('siproxd')) {
- log_error("Sipproxd is installed but not started. Not installing redirect rules.");
+ log_error("Siproxd is installed but not started. Not installing redirect rules.");
return;
}
/* proxy is turned off in package settings */
- if($siproxd_conf['sipenable'] == "0") {
- log_error("WARNING: siproxd proxy has not been enabled. Not installing rules.");
+ if ($siproxd_conf['sipenable'] == "0") {
+ log_error("WARNING: siproxd proxy has not been enabled. Not installing rules.");
return "\n";
}
@@ -84,25 +83,26 @@ function siproxd_generate_rules($type) {
$port = ($siproxd_conf['port'] ? $siproxd_conf['port'] : 5060);
switch($type) {
- case 'nat':
- $rules .= "\n# Setup Sipproxd proxy redirect\n";
- foreach ($ifaces as $iface) {
- if($iface <> "")
- $rules .= "rdr on {$iface} proto udp from any to !($iface) port {$port} -> 127.0.0.1 port {$port}\n";
- }
- break;
- case 'filter':
- case 'rule':
- foreach ($ifaces as $iface) {
- if($iface <> "") {
- $rules .= "# allow SIP signaling and RTP traffic\n";
- $rules .= "pass in on {$iface} proto udp from any to any port = {$port}\n";
- if($siproxd_conf['rtpenable'] == "1") {
- $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n";
+ case 'nat':
+ $rules .= "\n# Setup Siproxd proxy redirect\n";
+ foreach ($ifaces as $iface) {
+ if ($iface <> "") {
+ $rules .= "rdr on {$iface} proto udp from any to !($iface) port {$port} -> 127.0.0.1 port {$port}\n";
}
}
- }
- break;
+ break;
+ case 'filter':
+ case 'rule':
+ foreach ($ifaces as $iface) {
+ if ($iface <> "") {
+ $rules .= "# allow SIP signaling and RTP traffic\n";
+ $rules .= "pass in on {$iface} proto udp from any to any port = {$port}\n";
+ if ($siproxd_conf['rtpenable'] == "1") {
+ $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n";
+ }
+ }
+ }
+ break;
}
return $rules;
@@ -111,42 +111,50 @@ function siproxd_generate_rules($type) {
function sync_package_siproxd() {
global $config, $pfs_version;
- // put the constant to a variable
- $varSIPROXD = SIPROXD;
-
conf_mount_rw();
$siproxd_chroot = "/var/siproxd/";
- @mkdir($siproxd_chroot);
+ safe_mkdir($siproxd_chroot);
@chown($siproxd_chroot, "nobody");
@chgrp($siproxd_chroot, "nobody");
+ unlink_if_exists(SIPROXD . '/etc/rc.d/siproxd');
- unlink_if_exists("$varSIPROXD/etc/rc.d/siproxd");
$siproxd_conf = &$config['installedpackages']['siproxdsettings']['config'][0];
- $fout = fopen("$varSIPROXD/etc/siproxd.conf","w");
+ $siproxd_conffile = SIPROXD . '/etc/siproxd.conf';
+ $siproxd_pwfile = SIPROXD . '/etc/siproxd_passwd.cfg';
+
+ $pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
+ if ($pfs_version == '2.2') {
+ $siproxd_bin = SIPROXD . '/bin/siproxd';
+ } else {
+ $siproxd_bin = SIPROXD . '/sbin/siproxd';
+ }
+ $plugindir = SIPROXD . '/lib/siproxd';
+
+ $fout = fopen($siproxd_conffile, "w");
fwrite($fout, "# This file was automatically generated by the pfSense\n");
fwrite($fout, "# package management system.\n\n");
/* proxy is turned off in package settings */
- if($siproxd_conf['sipenable'] == "0") {
+ if ($siproxd_conf['sipenable'] == "0") {
fclose($fout);
return;
}
- if($siproxd_conf['if_inbound'] != "") {
+ if ($siproxd_conf['if_inbound'] != "") {
fwrite($fout, "if_inbound = " . convert_friendly_interface_to_real_interface_name($siproxd_conf['if_inbound']) . "\n");
}
- if($siproxd_conf['if_outbound'] != "") {
- if(intval($config['version']) < 6 && $config['interfaces'][$siproxd_conf['if_outbound']]['ipaddr'] == "pppoe") {
+ if ($siproxd_conf['if_outbound'] != "") {
+ if (intval($config['version']) < 6 && $config['interfaces'][$siproxd_conf['if_outbound']]['ipaddr'] == "pppoe") {
fwrite($fout, "if_outbound = ng0\n");
} else {
fwrite($fout, "if_outbound = " . convert_friendly_interface_to_real_interface_name($siproxd_conf['if_outbound']) . "\n");
}
}
- if($siproxd_conf['port'] != "") {
+ if ($siproxd_conf['port'] != "") {
fwrite($fout, "sip_listen_port = " . $siproxd_conf['port'] . "\n");
} else {
fwrite($fout, "sip_listen_port = 5060\n");
@@ -161,13 +169,13 @@ function sync_package_siproxd() {
fwrite($fout, "autosave_registrations = 10\n");
fwrite($fout, "pid_file = siproxd.pid\n");
- if($siproxd_conf['rtpenable'] != "") {
+ if ($siproxd_conf['rtpenable'] != "") {
fwrite($fout, "rtp_proxy_enable = " . $siproxd_conf['rtpenable'] . "\n");
} else {
fwrite($fout, "rtp_proxy_enable = 1\n");
}
- if(($siproxd_conf['rtplower'] != "") && ($siproxd_conf['rtpupper'] != "")) {
+ if (($siproxd_conf['rtplower'] != "") && ($siproxd_conf['rtpupper'] != "")) {
fwrite($fout, "rtp_port_low = " . $siproxd_conf['rtplower'] . "\n");
fwrite($fout, "rtp_port_high = " . $siproxd_conf['rtpupper'] . "\n");
} else {
@@ -175,102 +183,113 @@ function sync_package_siproxd() {
fwrite($fout, "rtp_port_high = 7079\n");
}
- if($siproxd_conf['rtptimeout'] != "") {
+ if ($siproxd_conf['rtptimeout'] != "") {
fwrite($fout, "rtp_timeout = " . $siproxd_conf['rtptimeout'] . "\n");
} else {
fwrite($fout, "rtp_timeout = 300\n");
}
- if($siproxd_conf['defaulttimeout'] != "") {
+ if ($siproxd_conf['defaulttimeout'] != "") {
fwrite($fout, "default_expires = " . $siproxd_conf['defaulttimeout'] . "\n");
} else {
fwrite($fout, "default_expires = 600\n");
}
- if($siproxd_conf['authentication']) {
+ if ($siproxd_conf['authentication']) {
fwrite($fout, "proxy_auth_realm = Authentication_Realm\n");
- fwrite($fout, "proxy_auth_pwfile = $varSIPROXD/etc/siproxd_passwd.cfg\n");
+ fwrite($fout, "proxy_auth_pwfile = {$siproxd_pwfile}\n");
}
- if($siproxd_conf['debug_level'] != "") {
+ if ($siproxd_conf['debug_level'] != "") {
fwrite($fout, "debug_level = " . $siproxd_conf['debug_level'] . "\n");
} else {
fwrite($fout, "debug_level = 0x00000000\n");
}
- if($siproxd_conf['debug_port'] != "") {
+ if ($siproxd_conf['debug_port'] != "") {
fwrite($fout, "debug_port = " . $siproxd_conf['debug_port'] . "\n");
}
- if($siproxd_conf['outboundproxyhost'] != "") {
- if($siproxd_conf['outboundproxyport'] != "") {
+ if ($siproxd_conf['outboundproxyhost'] != "") {
+ if ($siproxd_conf['outboundproxyport'] != "") {
fwrite($fout, "outbound_proxy_host = " . $siproxd_conf['outboundproxyhost'] . "\n");
fwrite($fout, "outbound_proxy_port = " . $siproxd_conf['outboundproxyport'] . "\n");
}
}
- if($siproxd_conf['expeditedforwarding'] != "")
+ if ($siproxd_conf['expeditedforwarding'] != "") {
fwrite($fout, "rtp_dscp = 46\n");
- if($siproxd_conf['expeditedsipforwarding'] != "")
+ }
+ if ($siproxd_conf['expeditedsipforwarding'] != "") {
fwrite($fout, "sip_dscp = 26\n");
-
- if ($siproxd_conf['rtp_input_dejitter'] != "")
+ }
+ if ($siproxd_conf['rtp_input_dejitter'] != "") {
fwrite($fout, "rtp_input_dejitter = " . $siproxd_conf['rtp_input_dejitter'] . "\n");
- if ($siproxd_conf['rtp_output_dejitter'] != "")
+ }
+ if ($siproxd_conf['rtp_output_dejitter'] != "") {
fwrite($fout, "rtp_output_dejitter = " . $siproxd_conf['rtp_output_dejitter'] . "\n");
- if ($siproxd_conf['tcp_timeout'] != "")
+ }
+ if ($siproxd_conf['tcp_timeout'] != "") {
fwrite($fout, "tcp_timeout = " . $siproxd_conf['tcp_timeout'] . "\n");
- if ($siproxd_conf['tcp_connect_timeout'] != "")
+ }
+ if ($siproxd_conf['tcp_connect_timeout'] != "") {
fwrite($fout, "tcp_connect_timeout = " . $siproxd_conf['tcp_connect_timeout'] . "\n");
- if ($siproxd_conf['tcp_keepalive'] != "")
+ }
+ if ($siproxd_conf['tcp_keepalive'] != "") {
fwrite($fout, "tcp_keepalive = " . $siproxd_conf['tcp_keepalive'] . "\n");
+ }
- fwrite($fout, "plugindir=$varSIPROXD/lib/siproxd/\n");
+ fwrite($fout, "plugindir={$plugindir}\n");
fwrite($fout, "load_plugin=plugin_logcall.la\n");
- if ($siproxd_conf['plugin_defaulttarget'] != "")
+ if ($siproxd_conf['plugin_defaulttarget'] != "") {
fwrite($fout, "load_plugin=plugin_defaulttarget.la\n");
- if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_log'] != ""))
+ }
+ if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_log'] != "")) {
fwrite($fout, "plugin_defaulttarget_log = 1\n");
- if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_target'] != ""))
+ }
+ if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_target'] != "")) {
fwrite($fout, "plugin_defaulttarget_target = " . $siproxd_conf['plugin_defaulttarget_target'] . "\n");
+ }
- if ($siproxd_conf['plugin_fix_bogus_via'] != "")
+ if ($siproxd_conf['plugin_fix_bogus_via'] != "") {
fwrite($fout, "load_plugin=plugin_fix_bogus_via.la\n");
- if (($siproxd_conf['plugin_fix_bogus_via'] != "") && ($siproxd_conf['plugin_fix_bogus_via_networks'] != ""))
+ }
+ if (($siproxd_conf['plugin_fix_bogus_via'] != "") && ($siproxd_conf['plugin_fix_bogus_via_networks'] != "")) {
fwrite($fout, "plugin_fix_bogus_via_networks = " . $siproxd_conf['plugin_fix_bogus_via_networks'] . "\n");
+ }
- if ($siproxd_conf['plugin_stun'] != "")
+ if ($siproxd_conf['plugin_stun'] != "") {
fwrite($fout, "load_plugin=plugin_stun.la\n");
- if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_server'] != ""))
+ }
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_server'] != "")) {
fwrite($fout, "plugin_stun_server = " . $siproxd_conf['plugin_stun_server'] . "\n");
- if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_port'] != ""))
+ }
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_port'] != "")) {
fwrite($fout, "plugin_stun_port = " . $siproxd_conf['plugin_stun_port'] . "\n");
- if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_period'] != ""))
+ }
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_period'] != "")) {
fwrite($fout, "plugin_stun_period = " . $siproxd_conf['plugin_stun_period'] . "\n");
+ }
fclose($fout);
- if ($pfs_version == '2.2')
- $bin_dir='bin';
- else
- $bin_dir='sbin';
-
write_rcfile(array(
"file" => "siproxd.sh",
- "start" => "$varSIPROXD/{$bin_dir}/siproxd -c $varSIPROXD/etc/siproxd.conf &",
+ "start" => "{$siproxd_bin} -c {$siproxd_conffile} &",
"stop" => "/usr/bin/killall -9 siproxd"
)
);
- exec("killall -9 siproxd");
-
- sleep(3);
-
- start_service("siproxd");
-
- sleep(3);
-
+ if (is_service_running('siproxd')) {
+ stop_service("siproxd");
+ sleep(3);
+ }
+ /* Only (re)start the service when siproxd is enabled */
+ if ($siproxd_conf['sipenable'] != "0") {
+ start_service("siproxd");
+ sleep(3);
+ }
filter_configure();
conf_mount_ro();
@@ -278,38 +297,54 @@ function sync_package_siproxd() {
}
function validate_form_siproxd($post, &$input_errors) {
- if ($post['port'] && !is_port($post['port']))
+ if ($post['port'] && !is_port($post['port'])) {
$input_errors[] = 'Invalid port entered for "Listening Port"';
- if ($post['rtplower'] && !is_port($post['rtplower']))
+ }
+ if ($post['rtplower'] && !is_port($post['rtplower'])) {
$input_errors[] = 'Invalid port entered for "RTP port range (lower)".';
- if ($post['rtpupper'] && !is_port($post['rtpupper']))
+ }
+ if ($post['rtpupper'] && !is_port($post['rtpupper'])) {
$input_errors[] = 'Invalid port entered for "RTP port range (upper)".';
- if ($post['rtplower'] && $post['rtpupper'] && ($post['rtplower'] >= $post['rtpupper']))
+ }
+ if ($post['rtplower'] && $post['rtpupper'] && ($post['rtplower'] >= $post['rtpupper'])) {
$input_errors[] = 'RTP lower port cannot be equal to or higher than the RTP upper port.';
- if ($post['rtptimeout'] && (!is_numeric($post['rtptimeout']) || ($post['rtptimeout'] < 0)))
+ }
+ if ($post['rtptimeout'] && (!is_numeric($post['rtptimeout']) || ($post['rtptimeout'] < 0))) {
$input_errors[] = '"RTP stream timeout" must be numeric and greater than 0.';
- if ($post['defaulttimeout'] && (!is_numeric($post['defaulttimeout']) || ($post['defaulttimeout'] < 0)))
+ }
+ if ($post['defaulttimeout'] && (!is_numeric($post['defaulttimeout']) || ($post['defaulttimeout'] < 0))) {
$input_errors[] = '"Default expiration timeout" must be numeric and greater than 0.';
- if ($post['outboundproxyhost'] && (!is_hostname($post['outboundproxyhost']) && !is_ipaddr($post['outboundproxyhost'])))
+ }
+ if ($post['outboundproxyhost'] && (!is_hostname($post['outboundproxyhost']) && !is_ipaddr($post['outboundproxyhost']))) {
$input_errors[] = 'Invalid hostname or IP address entered for "Outbound Proxy Host".';
- if ($post['outboundproxyport'] && !is_port($post['outboundproxyport']))
+ }
+ if ($post['outboundproxyport'] && !is_port($post['outboundproxyport'])) {
$input_errors[] = 'Invalid port entered for "Outbound Proxy Port".';
- if ($post['rtp_input_dejitter'] && (!is_numeric($post['rtp_input_dejitter']) || ($post['rtp_input_dejitter'] < 0)))
+ }
+ if ($post['rtp_input_dejitter'] && (!is_numeric($post['rtp_input_dejitter']) || ($post['rtp_input_dejitter'] < 0))) {
$input_errors[] = '"Input Dejitter" must be numeric and greater than 0.';
- if ($post['rtp_output_dejitter'] && (!is_numeric($post['rtp_output_dejitter']) || ($post['rtp_output_dejitter'] < 0)))
+ }
+ if ($post['rtp_output_dejitter'] && (!is_numeric($post['rtp_output_dejitter']) || ($post['rtp_output_dejitter'] < 0))) {
$input_errors[] = '"Output Dejitter" must be numeric and greater than 0.';
- if ($post['tcp_timeout'] && (!is_numeric($post['tcp_timeout']) || ($post['tcp_timeout'] < 0)))
+ }
+ if ($post['tcp_timeout'] && (!is_numeric($post['tcp_timeout']) || ($post['tcp_timeout'] < 0))) {
$input_errors[] = '"TCP inactivity timeout" must be numeric and greater than 0.';
- if ($post['tcp_connect_timeout'] && (!is_numeric($post['tcp_connect_timeout']) || ($post['tcp_connect_timeout'] < 0)))
+ }
+ if ($post['tcp_connect_timeout'] && (!is_numeric($post['tcp_connect_timeout']) || ($post['tcp_connect_timeout'] < 0))) {
$input_errors[] = '"TCP Connect Timeout" must be numeric and greater than 0.';
- if ($post['tcp_keepalive'] && (!is_numeric($post['tcp_keepalive']) || ($post['tcp_keepalive'] < 0)))
+ }
+ if ($post['tcp_keepalive'] && (!is_numeric($post['tcp_keepalive']) || ($post['tcp_keepalive'] < 0))) {
$input_errors[] = '"TCP Keepalive" must be numeric and greater than 0.';
- if ($post['plugin_stun_server'] && (!is_hostname($post['plugin_stun_server']) && !is_ipaddr($post['plugin_stun_server'])))
+ }
+ if ($post['plugin_stun_server'] && (!is_hostname($post['plugin_stun_server']) && !is_ipaddr($post['plugin_stun_server']))) {
$input_errors[] = 'Invalid hostname or IP address entered for "STUN Server".';
- if ($post['plugin_stun_port'] && !is_port($post['plugin_stun_port']))
+ }
+ if ($post['plugin_stun_port'] && !is_port($post['plugin_stun_port'])) {
$input_errors[] = 'Invalid port entered for "STUN Port".';
- if ($post['plugin_stun_period'] && (!is_numeric($post['plugin_stun_period']) || ($post['plugin_stun_period'] < 0)))
+ }
+ if ($post['plugin_stun_period'] && (!is_numeric($post['plugin_stun_period']) || ($post['plugin_stun_period'] < 0))) {
$input_errors[] = '"STUN Period" must be numeric and greater than 0.';
+ }
}
diff --git a/config/siproxd/siproxd.xml b/config/siproxd/siproxd.xml
index cca84138..e4375d8e 100644
--- a/config/siproxd/siproxd.xml
+++ b/config/siproxd/siproxd.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
@@ -43,7 +43,7 @@
]]>
</copyright>
<name>siproxdsettings</name>
- <version>1.0.5</version>
+ <version>1.0.6</version>
<title>siproxd: Settings</title>
<include_file>/usr/local/pkg/siproxd.inc</include_file>
<aftersaveredirect>/pkg_edit.php?xml=siproxd.xml&amp;id=0</aftersaveredirect>
@@ -371,15 +371,15 @@
<type>input</type>
</field>
</fields>
- <custom_php_global_functions>
- </custom_php_global_functions>
<custom_add_php_command>
sync_package_siproxd();
</custom_add_php_command>
<custom_php_resync_config_command>
sync_package_siproxd();
</custom_php_resync_config_command>
- <filter_rules_needed>siproxd_generate_rules</filter_rules_needed>
+ <filter_rules_needed>
+ siproxd_generate_rules();
+ </filter_rules_needed>
<custom_php_validation_command>
validate_form_siproxd($_POST, $input_errors);
</custom_php_validation_command>
diff --git a/config/siproxd/siproxd_registered_phones.php b/config/siproxd/siproxd_registered_phones.php
index a8789d7f..51eb474a 100644
--- a/config/siproxd/siproxd_registered_phones.php
+++ b/config/siproxd/siproxd_registered_phones.php
@@ -1,7 +1,9 @@
<?php
/*
siproxd_registered_phones.php
+ part of pfSense (https://www.pfSense.org/)
Copyright (C) 2010 Jim Pingle
+ Copyright (C) 2015 ESF, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -36,8 +38,7 @@
##|*MATCH=siproxd_registered_phones.php*
##|-PRIV
-require("guiconfig.inc");
-$pgtitle = array(gettext("Status"), gettext("siproxd Registered Phones"));
+require_once("guiconfig.inc");
$phonetext = file_get_contents("/var/siproxd/siproxd_registrations");
$phonedata = explode("\n", $phonetext);
@@ -47,27 +48,28 @@ if (!is_array($phonedata)) {
}
$activephones = array();
-for ($i=0; $i < count($phonedata); $i++) {
+for ($i = 0; $i < count($phonedata); $i++) {
list($stars, $active, $expires) = explode(":", $phonedata[$i]);
if ($active == "1") {
$phone = array();
$phone["expires"] = $expires;
- $phone["real"]["type"] = $phonedata[++$i];
- $phone["real"]["user"] = $phonedata[++$i];
- $phone["real"]["host"] = $phonedata[++$i];
- $phone["real"]["port"] = $phonedata[++$i];
- $phone["nat"]["type"] = $phonedata[++$i];
- $phone["nat"]["user"] = $phonedata[++$i];
- $phone["nat"]["host"] = $phonedata[++$i];
- $phone["nat"]["port"] = $phonedata[++$i];
- $phone["registered"]["type"] = $phonedata[++$i];
- $phone["registered"]["user"] = $phonedata[++$i];
- $phone["registered"]["host"] = $phonedata[++$i];
- $phone["registered"]["port"] = $phonedata[++$i];
+ $phone["real"]["type"] = $phonedata[++$i];
+ $phone["real"]["user"] = $phonedata[++$i];
+ $phone["real"]["host"] = $phonedata[++$i];
+ $phone["real"]["port"] = $phonedata[++$i];
+ $phone["nat"]["type"] = $phonedata[++$i];
+ $phone["nat"]["user"] = $phonedata[++$i];
+ $phone["nat"]["host"] = $phonedata[++$i];
+ $phone["nat"]["port"] = $phonedata[++$i];
+ $phone["registered"]["type"] = $phonedata[++$i];
+ $phone["registered"]["user"] = $phonedata[++$i];
+ $phone["registered"]["host"] = $phonedata[++$i];
+ $phone["registered"]["port"] = $phonedata[++$i];
$activephones[] = $phone;
}
}
+$pgtitle = array(gettext("Status"), gettext("siproxd Registered Phones"));
require("head.inc");
?>
@@ -77,8 +79,7 @@ require("head.inc");
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
+<tr><td>
<?php
$tab_array = array();
$tab_array[] = array(gettext("Settings"), false, "pkg_edit.php?xml=siproxd.xml&amp;id=0");
@@ -86,76 +87,73 @@ require("head.inc");
$tab_array[] = array(gettext("Registered Phones"), true, "siproxd_registered_phones.php");
display_top_tabs($tab_array);
?>
- </td>
- </tr>
-
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
- <thead>
- <tr>
- <td colspan="16" class="listtopic"><?php echo gettext("Currently Registered Phones") . " (" . count($activephones) . ")"; ?></td>
- </tr>
- <tr>
- <th colspan="5">Real Phone</th>
- <th colspan="5">NAT Address</th>
- <th colspan="4">Registered With</th>
- <th colspan="2">&nbsp;</th>
- </tr>
- <tr>
- <th>Type</th>
- <th>User</th>
- <th>Host</th>
- <th>Port</th>
- <th>&nbsp;</th>
- <th>Type</th>
- <th>User</th>
- <th>Host</th>
- <th>Port</th>
- <th>&nbsp;</th>
- <th>Type</th>
- <th>User</th>
- <th>Host</th>
- <th>Port</th>
- <th>&nbsp;</th>
- <th>Expires</th>
- </tr>
- </thead>
- <?php if (count($phonedata) == 0): ?>
- <tr><td colspan="16" align="center">No Phone Data Found</td></tr>
- <? elseif (count($activephones) == 0): ?>
- <tr><td colspan="16" align="center">No Active Phones</td></tr>
- <? else: ?>
- <? foreach ($activephones as $phone): ?>
- <tr>
- <td align="center" class="listlr"><? echo ($phone['real']['type']) ? $phone['real']['type'] : "sip"; ?></td>
- <td align="center" class="listr"><? echo ($phone['real']['user']) ? $phone['real']['user'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['real']['host']) ? $phone['real']['host'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['real']['port']) ? $phone['real']['port'] : "5060"; ?></td>
-
- <td align="center" class="list">&nbsp;</td>
- <td align="center" class="listlr"><? echo ($phone['nat']['type']) ? $phone['nat']['type'] : "sip"; ?></td>
- <td align="center" class="listr"><? echo ($phone['nat']['user']) ? $phone['nat']['user'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['nat']['host']) ? $phone['nat']['host'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['nat']['port']) ? $phone['nat']['port'] : "5060"; ?></td>
-
- <td align="center" class="list">&nbsp;</td>
- <td align="center" class="listlr"><? echo ($phone['registered']['type']) ? $phone['registered']['type'] : "sip"; ?></td>
- <td align="center" class="listr"><? echo ($phone['registered']['user']) ? $phone['registered']['user'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['registered']['host']) ? $phone['registered']['host'] : "&nbsp;"; ?></td>
- <td align="center" class="listr"><? echo ($phone['registered']['port']) ? $phone['registered']['port'] : "5060"; ?></td>
-
- <td align="center" class="list">&nbsp;</td>
- <td align="center" class="listlr"><? echo date("m/d/Y h:i:sa", $phone['expires']); ?></td>
- </tr>
- <? endforeach; ?>
- <? endif; ?>
- </table>
- </div>
- </td>
- </tr>
-
+</td></tr>
+
+<tr><td>
+ <div id="mainarea">
+ <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <td colspan="16" class="listtopic"><?php echo gettext("Currently Registered Phones") . " (" . count($activephones) . ")"; ?></td>
+ </tr>
+ <tr>
+ <th colspan="5">Real Phone</th>
+ <th colspan="5">NAT Address</th>
+ <th colspan="4">Registered With</th>
+ <th colspan="2">&nbsp;</th>
+ </tr>
+ <tr>
+ <th>Type</th>
+ <th>User</th>
+ <th>Host</th>
+ <th>Port</th>
+ <th>&nbsp;</th>
+ <th>Type</th>
+ <th>User</th>
+ <th>Host</th>
+ <th>Port</th>
+ <th>&nbsp;</th>
+ <th>Type</th>
+ <th>User</th>
+ <th>Host</th>
+ <th>Port</th>
+ <th>&nbsp;</th>
+ <th>Expires</th>
+ </tr>
+ </thead>
+
+ <?php if (count($phonedata) == 0): ?>
+ <tr><td colspan="16" align="center">No Phone Data Found</td></tr>
+ <? elseif (count($activephones) == 0): ?>
+ <tr><td colspan="16" align="center">No Active Phones</td></tr>
+ <? else: ?>
+ <? foreach ($activephones as $phone): ?>
+ <tr>
+ <td align="center" class="listlr"><? echo ($phone['real']['type']) ? $phone['real']['type'] : "sip"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['real']['user']) ? $phone['real']['user'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['real']['host']) ? $phone['real']['host'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['real']['port']) ? $phone['real']['port'] : "5060"; ?></td>
+
+ <td align="center" class="list">&nbsp;</td>
+ <td align="center" class="listlr"><? echo ($phone['nat']['type']) ? $phone['nat']['type'] : "sip"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['nat']['user']) ? $phone['nat']['user'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['nat']['host']) ? $phone['nat']['host'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['nat']['port']) ? $phone['nat']['port'] : "5060"; ?></td>
+
+ <td align="center" class="list">&nbsp;</td>
+ <td align="center" class="listlr"><? echo ($phone['registered']['type']) ? $phone['registered']['type'] : "sip"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['registered']['user']) ? $phone['registered']['user'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['registered']['host']) ? $phone['registered']['host'] : "&nbsp;"; ?></td>
+ <td align="center" class="listr"><? echo ($phone['registered']['port']) ? $phone['registered']['port'] : "5060"; ?></td>
+
+ <td align="center" class="list">&nbsp;</td>
+ <td align="center" class="listlr"><? echo date("m/d/Y h:i:sa", $phone['expires']); ?></td>
+ </tr>
+ <? endforeach; ?>
+ <? endif; ?>
+ </table>
+ </div>
+</td></tr>
</table>
<?php include("fend.inc"); ?>
diff --git a/config/siproxd/siproxdusers.xml b/config/siproxd/siproxdusers.xml
index 7a636a3b..6dd53efe 100644
--- a/config/siproxd/siproxdusers.xml
+++ b/config/siproxd/siproxdusers.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE packagegui SYSTEM "./schema/packages.dtd">
-<?xml-stylesheet type="text/xsl" href="./xsl/package.xsl"?>
+<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd">
+<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
<![CDATA[
@@ -43,9 +43,9 @@
]]>
</copyright>
<name>siproxdusers</name>
- <version>1.0.5</version>
+ <version>1.0.6</version>
<title>siproxd: Users</title>
- <include_file>/usr/local/pkg/siproxd.inc</include_file>
+ <include_file>/usr/local/pkg/siproxd.inc</include_file>
<tabs>
<tab>
<text>Settings</text>
@@ -93,9 +93,9 @@
</field>
</fields>
<custom_add_php_command>
- sync_package_sipproxd_users();
+ sync_package_siproxd_users();
</custom_add_php_command>
<custom_php_resync_config_command>
- sync_package_sipproxd_users();
+ sync_package_siproxd_users();
</custom_php_resync_config_command>
</packagegui>
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 027207b1..fb8cd9d8 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -45,11 +45,6 @@ ini_set("memory_limit", "384M");
// Explicitly declare this as global so it works through function call includes
global $g, $config, $rebuild_rules;
-// Grab the Snort binary version programmatically, but if that fails use a safe default
-$snortver = array();
-$snortbindir = SNORT_PBI_BINDIR;
-exec("{$snortbindir}snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver);
-
/* Rebuild Rules Flag -- if "true", rebuild enforcing rules and flowbit-rules files */
$rebuild_rules = false;
@@ -292,7 +287,8 @@ function snort_build_list($snortcfg, $listname = "", $whitelist = false, $extern
if (empty($list))
return $list;
$localnet = $list['localnets'];
- $wanip = $list['wanips'];
+// $wanip = $list['wanips'];
+ $wanip = 'yes';
$wangw = $list['wangateips'];
$wandns = $list['wandnsips'];
$vips = $list['vips'];
@@ -471,7 +467,7 @@ function snort_build_list($snortcfg, $listname = "", $whitelist = false, $extern
/* iterate all vips and add to whitelist */
if (is_array($config['virtualip']) && is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $vip) {
- if ($vip['subnet'] && $vip['mode'] != 'proxyarp') {
+ if ($vip['subnet']) {
if (!in_array("{$vip['subnet']}/{$vip['subnet_bits']}", $home_net))
$home_net[] = "{$vip['subnet']}/{$vip['subnet_bits']}";
}
@@ -3454,7 +3450,7 @@ function snort_prepare_rule_files($snortcfg, $snortcfgdir) {
/* Build a new sid-msg.map file from the enabled */
/* rules and copy it to the interface directory. */
- log_error(gettext("[Snort] Building new sig-msg.map file for " . convert_friendly_interface_to_friendly_descr($snortcfg['interface']) . "..."));
+ log_error(gettext("[Snort] Building new sid-msg.map file for " . convert_friendly_interface_to_friendly_descr($snortcfg['interface']) . "..."));
snort_build_sid_msg_map("{$snortcfgdir}/rules/", "{$snortcfgdir}/sid-msg.map");
}
diff --git a/config/snort/snort.xml b/config/snort/snort.xml
index e3e1cdad..b8444009 100755
--- a/config/snort/snort.xml
+++ b/config/snort/snort.xml
@@ -45,7 +45,7 @@
</copyright>
<description>Snort IDS/IPS Package</description>
<name>Snort</name>
- <version>3.2.6</version>
+ <version>3.2.7</version>
<title>Services: Snort IDS</title>
<include_file>/usr/local/pkg/snort/snort.inc</include_file>
<menu>
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php
index 0c4543cd..123661e4 100755
--- a/config/snort/snort_check_for_rule_updates.php
+++ b/config/snort/snort_check_for_rule_updates.php
@@ -64,19 +64,14 @@ $openappid_detectors = $config['installedpackages']['snortglobal']['openappid_de
/* Working directory for downloaded rules tarballs and extraction */
$tmpfname = "{$g['tmp_path']}/snort_rules_up";
-/* Grab the Snort binary version programmatically and use it to construct */
-/* the proper Snort VRT rules tarball and md5 filenames. Fallback to a */
-/* default in the event we fail. */
-$snortver = array();
-exec("{$snortbindir}snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver);
-// Save the version with decimal delimiters for use in extracting the rules
-$snort_version = $snortver[0];
-if (empty($snort_version))
- $snort_version = SNORT_BIN_VERSION;
+/* Use the Snort binary version to construct the proper Snort VRT */
+/* rules tarball and md5 filenames. Save the version with decimal */
+/* delimiters for use in extracting the rules. */
+$snort_version = SNORT_BIN_VERSION;
// Create a collapsed version string for use in the tarball filename
-$snortver[0] = str_replace(".", "", $snortver[0]);
-$snort_filename = "snortrules-snapshot-{$snortver[0]}.tar.gz";
+$snortver = str_replace(".", "", SNORT_BIN_VERSION);
+$snort_filename = "snortrules-snapshot-{$snortver}.tar.gz";
$snort_filename_md5 = "{$snort_filename}.md5";
$snort_rule_url = VRT_DNLD_URL;
diff --git a/config/snort/snort_defs.inc b/config/snort/snort_defs.inc
index 3f5c82e5..ac09db44 100644
--- a/config/snort/snort_defs.inc
+++ b/config/snort/snort_defs.inc
@@ -49,13 +49,12 @@ if (!defined("SNORTLOGDIR"))
define("SNORTLOGDIR", "{$g['varlog_path']}/snort");
if (!defined("SNORT_BIN_VERSION")) {
// Grab the Snort binary version programmatically
- $snortver = array();
$snortbindir = SNORT_PBI_BINDIR;
- mwexec("{$snortbindir}/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver);
- if (!empty($snortver[0]))
- define("SNORT_BIN_VERSION", $snortver[0]);
+ $snortver = exec_command("{$snortbindir}/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26");
+ if (!empty($snortver))
+ define("SNORT_BIN_VERSION", $snortver);
else
- define("SNORT_BIN_VERSION", "2.9.7.3");
+ define("SNORT_BIN_VERSION", "2.9.7.5");
}
if (!defined("SNORT_SID_MODS_PATH"))
define('SNORT_SID_MODS_PATH', "{$g['vardb_path']}/snort/sidmods/");
diff --git a/config/snort/snort_migrate_config.php b/config/snort/snort_migrate_config.php
index ae1daf6a..edcbb2d5 100644
--- a/config/snort/snort_migrate_config.php
+++ b/config/snort/snort_migrate_config.php
@@ -541,10 +541,10 @@ unset($r);
// Log a message if we changed anything
if ($updated_cfg) {
- $config['installedpackages']['snortglobal']['snort_config_ver'] = "3.2.6";
log_error("[Snort] Settings successfully migrated to new configuration format...");
}
-else
+else {
log_error("[Snort] Configuration version is current...");
+}
?>
diff --git a/config/snort/snort_passlist.php b/config/snort/snort_passlist.php
index 965f22d7..1b377a1f 100644
--- a/config/snort/snort_passlist.php
+++ b/config/snort/snort_passlist.php
@@ -197,7 +197,8 @@ if ($savemsg) {
<p><?php echo gettext("1. Here you can create Pass List files for your Snort package rules. Hosts on a Pass List are never blocked by Snort."); ?><br/>
<?php echo gettext("2. Add all the IP addresses or networks (in CIDR notation) you want to protect against Snort block decisions."); ?><br/>
<?php echo gettext("3. The default Pass List includes the WAN IP and gateway, defined DNS servers, VPNs and locally-attached networks."); ?><br/>
- <?php echo gettext("4. Be careful, it is very easy to get locked out of your system by altering the default settings."); ?></p></span></td>
+ <?php echo gettext("4. Be careful, it is very easy to get locked out of your system by altering the default settings."); ?><br/>
+ <?php echo gettext("5. To use a custom Pass List on an interface, you must manually assign the list using the drop-down control on the Interface Settings tab."); ?></p></span></td>
</tr>
<tr>
<td width="100%"><span class="vexpl"><?php echo gettext("Remember you must restart Snort on the interface for changes to take effect!"); ?></span></td>
diff --git a/config/snort/snort_passlist_edit.php b/config/snort/snort_passlist_edit.php
index 75724344..25ebcc82 100644
--- a/config/snort/snort_passlist_edit.php
+++ b/config/snort/snort_passlist_edit.php
@@ -3,7 +3,7 @@
* snort_passlist_edit.php
* Copyright (C) 2004 Scott Ullrich
* Copyright (C) 2011-2012 Ermal Luci
- * Copyright (C) 2014 Bill Meeks
+ * Copyright (C) 2015 Bill Meeks
* All rights reserved.
*
* originially part of m0n0wall (http://m0n0.ch/wall)
@@ -71,7 +71,7 @@ if (isset($id) && isset($a_passlist[$id])) {
$pconfig['address'] = $a_passlist[$id]['address'];
$pconfig['descr'] = html_entity_decode($a_passlist[$id]['descr']);
$pconfig['localnets'] = $a_passlist[$id]['localnets'];
- $pconfig['wanips'] = $a_passlist[$id]['wanips'];
+// $pconfig['wanips'] = $a_passlist[$id]['wanips'];
$pconfig['wangateips'] = $a_passlist[$id]['wangateips'];
$pconfig['wandnsips'] = $a_passlist[$id]['wandnsips'];
$pconfig['vips'] = $a_passlist[$id]['vips'];
@@ -87,7 +87,7 @@ if ($_GET['act'] == "import") {
$pconfig['address'] = htmlspecialchars($_GET['address']);
$pconfig['descr'] = htmlspecialchars($_GET['descr']);
$pconfig['localnets'] = htmlspecialchars($_GET['localnets'])? 'yes' : 'no';
- $pconfig['wanips'] = htmlspecialchars($_GET['wanips'])? 'yes' : 'no';
+// $pconfig['wanips'] = htmlspecialchars($_GET['wanips'])? 'yes' : 'no';
$pconfig['wangateips'] = htmlspecialchars($_GET['wangateips'])? 'yes' : 'no';
$pconfig['wandnsips'] = htmlspecialchars($_GET['wandnsips'])? 'yes' : 'no';
$pconfig['vips'] = htmlspecialchars($_GET['vips'])? 'yes' : 'no';
@@ -168,7 +168,7 @@ if ($_POST['save']) {
$p_list['name'] = $_POST['name'];
$p_list['uuid'] = $passlist_uuid;
$p_list['localnets'] = $_POST['localnets']? 'yes' : 'no';
- $p_list['wanips'] = $_POST['wanips']? 'yes' : 'no';
+// $p_list['wanips'] = $_POST['wanips']? 'yes' : 'no';
$p_list['wangateips'] = $_POST['wangateips']? 'yes' : 'no';
$p_list['wandnsips'] = $_POST['wandnsips']? 'yes' : 'no';
$p_list['vips'] = $_POST['vips']? 'yes' : 'no';
@@ -255,7 +255,6 @@ if ($savemsg)
<tr>
<td colspan="2" valign="top" class="listtopic"><?php echo gettext("Add auto-generated IP Addresses."); ?></td>
</tr>
-
<tr>
<td width="22%" valign="top" class="vncell"><?php echo gettext("Local Networks"); ?></td>
<td width="78%" class="vtable"><input name="localnets" type="checkbox"
@@ -263,14 +262,6 @@ if ($savemsg)
<?php if($pconfig['localnets'] == 'yes'){ echo "checked";} if($pconfig['localnets'] == ''){ echo "checked";} ?> />
<span class="vexpl"> <?php echo gettext("Add firewall Local Networks to the list (excluding WAN)."); ?> </span></td>
</tr>
-
- <tr>
- <td width="22%" valign="top" class="vncell"><?php echo gettext("WAN IPs"); ?></td>
- <td width="78%" class="vtable"><input name="wanips" type="checkbox"
- id="wanips" size="40" value="yes"
- <?php if($pconfig['wanips'] == 'yes'){ echo "checked";} if($pconfig['wanips'] == ''){ echo "checked";} ?> />
- <span class="vexpl"> <?php echo gettext("Add WAN interface IPs to the list."); ?> </span></td>
- </tr>
<tr>
<td width="22%" valign="top" class="vncell"><?php echo gettext("WAN Gateways"); ?></td>
<td width="78%" class="vtable"><input name="wangateips"
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index 280f0efe..bbb2642c 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -265,8 +265,8 @@ if (stristr($config['widgets']['sequence'], "snort_alerts-container") === FALSE)
$config['widgets']['sequence'] .= ",{$snort_widget_container}";
/* Update Snort package version in configuration */
-$config['installedpackages']['snortglobal']['snort_config_ver'] = "3.2.6";
-write_config("Snort pkg v3.2.6: post-install configuration saved.");
+$config['installedpackages']['snortglobal']['snort_config_ver'] = $config['installedpackages']['package'][get_pkg_id("snort")]['version'];
+write_config("Snort pkg v{$config['installedpackages']['package'][get_pkg_id("snort")]['version']}: post-install configuration saved.");
/* Done with post-install, so clear flag */
unset($g['snort_postinstall']);
diff --git a/config/urlsnarf/urlsnarf.xml b/config/urlsnarf/urlsnarf.xml
index c65d1a14..97b3d6bd 100644
--- a/config/urlsnarf/urlsnarf.xml
+++ b/config/urlsnarf/urlsnarf.xml
@@ -3,23 +3,28 @@
<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?>
<packagegui>
<copyright>
- <![CDATA[
-/* ========================================================================== */
+<![CDATA[
+/* $Id$ */
+/* ====================================================================================== */
/*
- part of pfSense (http://www.pfSense.com)
- Copyright (C) 2013
+ urlsnarf.xml
+ part of pfSense (https://www.pfSense.org/)
+ Copyright (C) 2013-2015 ESF, LLC
All rights reserved.
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
@@ -31,14 +36,12 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- */
-/* ========================================================================== */
+*/
+/* ====================================================================================== */
]]>
</copyright>
<description>urlsnarf</description>
- <requirements>None</requirements>
- <faq></faq>
<name>urlsnarf</name>
- <version>0.0</version>
+ <version>2.4b1</version>
<title>urlsnarf</title>
-</packagegui> \ No newline at end of file
+</packagegui>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 3eeb4e2c..0c567e21 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -39,7 +39,7 @@
</descr>
<website>http://www.asterisk.org/</website>
<category>Services</category>
- <version>0.3.1</version>
+ <version>0.3.2</version>
<status>Beta</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/asterisk/asterisk.xml</config_file>
@@ -96,7 +96,7 @@
<category>Diagnostics</category>
<pkginfolink>https://forum.pfsense.org/index.php/topic,26974.0.html</pkginfolink>
<config_file>https://packages.pfsense.org/packages/config/filemgr/filemgr.xml</config_file>
- <version>0.2.0</version>
+ <version>0.2.1</version>
<status>Beta</status>
<required_version>2.2</required_version>
<maintainer>tom@tomschaefer.org</maintainer>
@@ -388,14 +388,14 @@
<category>Security</category>
<run_depends>bin/snort:security/snort</run_depends>
<port_category>security</port_category>
- <depends_on_package_pbi>snort-2.9.7.3-##ARCH##.pbi</depends_on_package_pbi>
+ <depends_on_package_pbi>snort-2.9.7.5-##ARCH##.pbi</depends_on_package_pbi>
<build_pbi>
<port>security/snort</port>
<ports_after>security/barnyard2</ports_after>
</build_pbi>
<build_options>barnyard2_UNSET_FORCE=ODBC PGSQL PRELUDE;barnyard2_SET_FORCE=GRE IPV6 MPLS MYSQL PORT_PCAP BRO;snort_SET_FORCE=BARNYARD PERFPROFILE SOURCEFIRE GRE IPV6 NORMALIZER APPID;snort_UNSET_FORCE=PULLEDPORK FILEINSPECT HA</build_options>
<config_file>https://packages.pfsense.org/packages/config/snort/snort.xml</config_file>
- <version>3.2.6</version>
+ <version>3.2.7</version>
<required_version>2.2</required_version>
<status>Stable</status>
<configurationfile>/snort.xml</configurationfile>
@@ -546,7 +546,7 @@
<build_pbi>
<port>net/siproxd</port>
</build_pbi>
- <version>1.0.5</version>
+ <version>1.0.6</version>
<status>Beta</status>
<required_version>2.2</required_version>
<configurationfile>siproxd.xml</configurationfile>