diff options
-rw-r--r-- | src/conf.default/config.xml | 2 | ||||
-rw-r--r-- | src/etc/inc/globals.inc | 5 | ||||
-rw-r--r-- | src/etc/inc/pfsense-utils.inc | 108 | ||||
-rw-r--r-- | src/etc/inc/priv.defs.inc | 6 | ||||
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 6 | ||||
-rw-r--r-- | src/etc/inc/zeromq.inc | 340 | ||||
-rw-r--r-- | src/etc/pfSense.obsoletedfiles | 2 | ||||
-rw-r--r-- | src/usr/local/www/help.php | 1 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_settings.php | 114 | ||||
-rwxr-xr-x | src/usr/local/www/xmlrpc.php | 26 |
10 files changed, 11 insertions, 599 deletions
diff --git a/src/conf.default/config.xml b/src/conf.default/config.xml index b1b59fa..41559a4 100644 --- a/src/conf.default/config.xml +++ b/src/conf.default/config.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <pfsense> - <version>12.2</version> + <version>12.3</version> <lastchange/> <theme>pfsense_ng</theme> <system> diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 509a22f..32b25ca 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -74,17 +74,14 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "12.2", + "latest_config" => "12.3", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", "wan_interface_name" => "wan", - "xmlrpcbaseurl" => "https://packages.pfsense.org", "captiveportal_path" => "/usr/local/captiveportal", "captiveportal_element_path" => "/var/db/cpelements", "captiveportal_element_sizelimit" => 1048576, - "xmlrpcpath" => "/xmlrpc.php", - "embeddedbootupslice" => "/dev/ad0a", "services_dhcp_server_enable" => true, "wireless_regex" => "/^(ndis|wi|ath|an|ral|ural|iwi|wlan|rum|run|bwn|zyd|mwl|bwi|ipw|iwn|malo|uath|upgt|urtw|wpi)/", "help_base_url" => "/help.php", diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 4eefaa0..80a17d3 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -740,103 +740,6 @@ function rmdir_recursive($path, $follow_links=false) { } /* - * call_pfsense_method(): Call a method exposed by the pfsense.org XMLRPC server. - */ -function call_pfsense_method($method, $params, $timeout = 0) { - global $g, $config; - - $xmlrpc_base_url = get_active_xml_rpc_base_url(); - $xmlrpc_path = $g['xmlrpcpath']; - - $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url); - $ip = gethostbyname($xmlrpcfqdn); - if ($ip == $xmlrpcfqdn) { - return false; - } - - $msg = new XML_RPC_Message($method, array(XML_RPC_Encode($params))); - $port = 0; - $proxyurl = ""; - $proxyport = 0; - $proxyuser = ""; - $proxypass = ""; - if (!empty($config['system']['proxyurl'])) { - $proxyurl = $config['system']['proxyurl']; - } - if (!empty($config['system']['proxyport']) && is_numeric($config['system']['proxyport'])) { - $proxyport = $config['system']['proxyport']; - } - if (!empty($config['system']['proxyuser'])) { - $proxyuser = $config['system']['proxyuser']; - } - if (!empty($config['system']['proxypass'])) { - $proxypass = $config['system']['proxypass']; - } - $cli = new XML_RPC_Client($xmlrpc_path, $xmlrpc_base_url, $port, $proxyurl, $proxyport, $proxyuser, $proxypass); - // If the ALT PKG Repo has a username/password set, use it. - if ($config['system']['altpkgrepo']['username'] && - $config['system']['altpkgrepo']['password']) { - $username = $config['system']['altpkgrepo']['username']; - $password = $config['system']['altpkgrepo']['password']; - $cli->setCredentials($username, $password); - } - $resp = $cli->send($msg, $timeout); - if (!is_object($resp)) { - log_error(sprintf(gettext("XMLRPC communication error: %s"), $cli->errstr)); - return false; - } elseif ($resp->faultCode()) { - log_error(sprintf(gettext('XMLRPC request failed with error %1$s: %2$s'), $resp->faultCode(), $resp->faultString())); - return false; - } else { - return XML_RPC_Decode($resp->value()); - } -} - -/* - * check_firmware_version(): Check whether the current firmware installed is the most recently released. - */ -function check_firmware_version($tocheck = "all", $return_php = true) { - global $g, $config; - - $xmlrpc_base_url = get_active_xml_rpc_base_url(); - $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url); - $ip = gethostbyname($xmlrpcfqdn); - if ($ip == $xmlrpcfqdn) { - return false; - } - $version = php_uname('r'); - $version = explode('-', $version); - $rawparams = array("firmware" => array("version" => $g['product_version']), - "kernel" => array("version" => $version[0]), - "base" => array("version" => $version[0]), - "platform" => trim(file_get_contents('/etc/platform')), - "config_version" => $config['version'] - ); - unset($version); - - if ($tocheck == "all") { - $params = $rawparams; - } else { - foreach ($tocheck as $check) { - $params['check'] = $rawparams['check']; - $params['platform'] = $rawparams['platform']; - } - } - if ($config['system']['firmware']['branch']) { - $params['branch'] = $config['system']['firmware']['branch']; - } - - /* XXX: What is this method? */ - if (!($versions = call_pfsense_method('pfsense.get_firmware_version', $params))) { - return false; - } else { - $versions["current"] = $params; - } - - return $versions; -} - -/* * host_firmware_version(): Return the versions used in this install */ function host_firmware_version($tocheck = "") { @@ -3183,15 +3086,4 @@ function pkg_call_plugins($plugin_type, $plugin_params) { return $results; } -/* Function to find and return the active XML RPC base URL to avoid code duplication */ -function get_active_xml_rpc_base_url() { - global $config, $g; - /* If the user has activated the option to enable an alternate xmlrpcbaseurl, and it's not empty, then use it */ - if (isset($config['system']['altpkgrepo']['enable']) && !empty($config['system']['altpkgrepo']['xmlrpcbaseurl'])) { - return $config['system']['altpkgrepo']['xmlrpcbaseurl']; - } else { - return $g['xmlrpcbaseurl']; - } -} - ?> diff --git a/src/etc/inc/priv.defs.inc b/src/etc/inc/priv.defs.inc index 7d2154f..f54d644 100644 --- a/src/etc/inc/priv.defs.inc +++ b/src/etc/inc/priv.defs.inc @@ -710,12 +710,6 @@ $priv_list['page-system-packagemanager-installed']['descr'] = gettext("Allow acc $priv_list['page-system-packagemanager-installed']['match'] = array(); $priv_list['page-system-packagemanager-installed']['match'][] = "pkg_mgr_installed.php*"; -$priv_list['page-pkg-mgr-settings'] = array(); -$priv_list['page-pkg-mgr-settings']['name'] = gettext("WebCfg - Packages: Settings page"); -$priv_list['page-pkg-mgr-settings']['descr'] = gettext("Allow access to the 'Packages: Settings' page."); -$priv_list['page-pkg-mgr-settings']['match'] = array(); -$priv_list['page-pkg-mgr-settings']['match'][] = "pkg_mgr_settings.php*"; - $priv_list['page-diagnostics-rebootsystem'] = array(); $priv_list['page-diagnostics-rebootsystem']['name'] = gettext("WebCfg - Diagnostics: Reboot System page"); $priv_list['page-diagnostics-rebootsystem']['descr'] = gettext("Allow access to the 'Diagnostics: Reboot System' page."); diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 9bf570e..89b3d0d 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -3959,4 +3959,10 @@ function upgrade_121_to_122() { } } +function upgrade_122_123() { + if (isset($config['system']['altpkgrepo'])) { + unset($config['system']['altpkgrepo']); + } +} + ?> diff --git a/src/etc/inc/zeromq.inc b/src/etc/inc/zeromq.inc deleted file mode 100644 index 6b513d3..0000000 --- a/src/etc/inc/zeromq.inc +++ /dev/null @@ -1,340 +0,0 @@ -<?php -/* - zeromq.inc - part of the pfSense project (https://www.pfsense.org) - Copyright 2010 Scott Ullrich <sullrich@gmail.com> - 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. - - 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('ZEROMQ_AUTH_FAIL', 'authfail'); -define('ZEROMQ_TRUE', 'true'); -define('ZEROMQ_FASLE', 'false'); - -$do_not_include_config_gui_inc = true; -require_once("auth.inc"); - -//$debug = true; - -/* zeromq_send: Send a message to a member node */ -function zeromq_send($protocol = "tcp", $ipaddress = "127.0.0.1", $port = "8888", - $method, $params, $username, $password) { - - global $debug; - - /* Set calling function and auth information */ - $xmlparams = array( - $username, - $password, - $method, - $params - ); - - /* Create new queue object */ - $queue = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, "MySock1"); - $queue->connect("{$protocol}://{$ipaddress}:{$port}"); - - /* Assign socket 1 to the queue, send and receive */ - $result = $queue->send(serialize($xmlparams))->recv(); - - /* xmlrpc_params_to_php() the result and return */ - $unserializedresult = unserialize($result); - - /* Return the result to the caller */ - return $unserializedresult; -} - -function zeromq_server($protocol = "tcp", $ipaddress = "127.0.0.1", $port = "8888") { - global $debug; - if (!$ipaddress || !$port) { - if ($debug) { - echo "ERROR: You must pass, proto, ipaddress and port\n"; - } - return; - } - if ($debug) { - echo "Creating ZMQSocket()\n"; - } - $server = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REP); - if ($debug) { - echo "Binding to {$protocol}://{$ipaddress}:{$port}\n"; - } - $server->bind("{$protocol}://{$ipaddress}:{$port}"); - if ($debug) { - echo "Entering while() loop\n"; - } - while ($msg = $server->recv()) { - // Convert the XML to a PHP array - $message = unserialize($msg); - if ($debug) { - echo "Message received:\n"; - print_r($message); - } - switch ($message[2]) { - case "pfsense.exec_shell": - $function_to_call = "exec_shell_zeromq"; - break; - case "pfsense.exec_php": - $function_to_call = "exec_php_zeromq"; - break; - case "pfsense.filter_configure": - $function_to_call = "filter_configure_zeromq"; - break; - case "pfsense.interfaces_carp_configure": - $function_to_call = "interfaces_carp_configure_zeromq"; - break; - case "pfsense.backup_config_section": - $function_to_call = "backup_config_section_zeromq"; - break; - case "pfsense.restore_config_section": - $function_to_call = "restore_config_section_zeromq"; - break; - case "pfsense.merge_config_section": - $function_to_call = "merge_config_section_zeromq"; - break; - case "pfsense.merge_installedpackages_section_zeromq": - $function_to_call = "merge_installedpackages_section_zeromq"; - break; - case "pfsense.check_firmware_version": - $function_to_call = "check_firmware_version_zeromq"; - break; - case "pfsense.reboot": - $function_to_call = "reboot_zeromq"; - break; - case "pfsense.get_notices": - $function_to_call = "get_notices_zeromq"; - break; - } - if (!$function_to_call) { - if ($debug) { - echo "ERROR: Could not find a function to call"; - } - return; - } else { - if ($debug) { - echo "Invoking function {$message[2]}()\n;"; - } - } - /* Call function that is being invoked */ - $result = $function_to_call($message); - /* echo back the result */ - $server->send($result); - } -} - -function zeromq_auth($params) { - global $config, $g, $debug; - - $username = $params[0]; - $passwd = $params[1]; - - $user = getUserEntry($username); - if (!$user) { - if ($debug) { - echo "Could not locate user $username with getUserEntry()\n"; - } - return false; - } - - if (is_account_disabled($username) || is_account_expired($username)) { - if ($debug) { - echo "Returning account expired/disabled\n"; - } - return false; - } - - if ($user['password']) { - $passwd = crypt($passwd, $user['password']); - if ($passwd == $user['password']) { - return true; - } - } - - if ($user['md5-hash']) { - $passwd = md5($passwd); - if ($passwd == $user['md5-hash']) { - return true; - } - } - - if ($debug) { - echo "zeromq_auth() fall through == false\n"; - } - - return false; -} - -function exec_php_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - if ($debug) { - echo "Auth failed in exec_shell_zeromq()\n"; - } - return ZEROMQ_AUTH_FAIL; - } - $exec_php = $params[3]; - if ($debug) { - echo "Running exec_php_zeromq(): {$exec_php}\n"; - } - eval($exec_php); - if ($toreturn) { - return serialize($toreturn); - } else { - return ZEROMQ_FASLE; - } -} - -function exec_shell_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - if ($debug) { - echo "Auth failed in exec_shell_zeromq()\n"; - } - return ZEROMQ_AUTH_FAIL; - } - $shell_cmd = $params[3]; - if ($debug) { - echo "Running exec_shell_zeromq(): {$shell_cmd}\n"; - } - mwexec($shell_cmd); - return ZEROMQ_FASLE; -} - -function backup_config_section_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - $val = array_intersect_key($config, array_flip($params[3])); - return serialize($val); -} - -function restore_config_section_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - $config = array_merge($config, $params[3]); - $mergedkeys = implode(",", array_keys($params[3])); - write_config(sprintf(gettext("Merged in config (%s sections) from ZeroMQ client."), $mergedkeys)); - return ZEROMQ_FASLE; -} - -function merge_installedpackages_section_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - $config['installedpackages'] = array_merge($config['installedpackages'], $params[0]); - $mergedkeys = implode(",", array_keys($params[3])); - write_config(sprintf(gettext("Merged in config (%s sections) from ZeroMQ client."), $mergedkeys)); - return ZEROMQ_FASLE; -} - -function merge_config_section_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - $config = array_merge_recursive_unique($config, $params[0]); - $mergedkeys = implode(",", array_keys($params[3])); - write_config("Merged in config ({$mergedkeys} sections) from ZeroMQ client."); - return ZEROMQ_FASLE; -} - -function filter_configure_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - filter_configure(); - system_routing_configure(); - setup_gateways_monitor(); - relayd_configure(); - require_once("openvpn.inc"); - openvpn_resync_all(); - services_dhcpd_configure(); - if (isset($config['dnsmasq']['enable'])) { - services_dnsmasq_configure(); - } elseif (isset($config['unbound']['enable'])) { - services_unbound_configure(); - } - local_sync_accounts(); - return ZEROMQ_FASLE; -} - -function interfaces_carp_configure_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - interfaces_sync_setup(); - interfaces_vips_configure(); - return ZEROMQ_FASLE; -} - -function check_firmware_version_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - return serialize(check_firmware_version(false)); -} - -function reboot_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - mwexec_bg("/etc/rc.reboot"); - return ZEROMQ_FASLE; -} - -function get_notices_zeromq($raw_params) { - global $config, $g, $debug; - $params = $raw_params; - if (zeromq_auth($raw_params) == false) { - return ZEROMQ_AUTH_FAIL; - } - if (!function_exists("get_notices")) { - require("notices.inc"); - } - if (!$params) { - $toreturn = get_notices(); - } else { - $toreturn = get_notices($params); - } - return serialize($toreturn); -} - -?> diff --git a/src/etc/pfSense.obsoletedfiles b/src/etc/pfSense.obsoletedfiles index aab007b..6dfcc9d 100644 --- a/src/etc/pfSense.obsoletedfiles +++ b/src/etc/pfSense.obsoletedfiles @@ -18,6 +18,7 @@ /etc/inc/m0n0 /etc/inc/regdomain.inc /etc/inc/sysctl.inc +/etc/inc/zeromq.inc /etc/isdn /etc/locate.rc /etc/mail.rc @@ -782,6 +783,7 @@ /usr/local/www/niftycssprintCode.css /usr/local/www/niftyjsCode.js /usr/local/www/pool.js +/usr/local/www/pkg_mgr_settings.php /usr/local/www/preload.php /usr/local/www/progress.php /usr/local/www/protochart diff --git a/src/usr/local/www/help.php b/src/usr/local/www/help.php index a59c521..5d30e11 100644 --- a/src/usr/local/www/help.php +++ b/src/usr/local/www/help.php @@ -138,7 +138,6 @@ $helppages = array( 'pkg_mgr.php' => 'https://doc.pfsense.org/index.php/Package_Manager', 'pkg_mgr_install.php' => 'https://doc.pfsense.org/index.php/Package_Manager', 'pkg_mgr_installed.php' => 'https://doc.pfsense.org/index.php/Package_Manager', - 'pkg_mgr_settings.php' => 'https://doc.pfsense.org/index.php/Package_Manager_Settings', 'interfaces.php' => 'https://doc.pfsense.org/index.php/Interface_Settings', 'interfaces_assign.php' => 'https://doc.pfsense.org/index.php/Assign_Interfaces', 'interfaces_bridge.php' => 'https://doc.pfsense.org/index.php/Interface_Bridges', diff --git a/src/usr/local/www/pkg_mgr_settings.php b/src/usr/local/www/pkg_mgr_settings.php deleted file mode 100644 index f44b0be..0000000 --- a/src/usr/local/www/pkg_mgr_settings.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php -/* $Id$ */ -/* - pkg_mgr_settings.php - part of pfSense - Copyright (C) 2013-2015 Electric Sheep Fencing, LP - Copyright (C) 2009 Jim Pingle <jimp@pfsense.org> - Copyright (C) 2004-2010 Scott Ullrich <sullrich@gmail.com> - Copyright (C) 2005 Colin Smith - - 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. - - 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. -*/ -/* - pfSense_MODULE: pkgs -*/ - -##|+PRIV -##|*IDENT=page-pkg-mgr-settings -##|*NAME=Packages: Settings page -##|*DESCR=Allow access to the 'Packages: Settings' page. -##|*MATCH=pkg_mgr_settings.php* -##|-PRIV - -ini_set('max_execution_time', '0'); - -require_once("globals.inc"); -require_once("guiconfig.inc"); -require_once("pkg-utils.inc"); - -if ($_POST) { - if (!$input_errors) { - if ($_POST['alturlenable'] == "yes") { - $config['system']['altpkgrepo']['enable'] = true; - $config['system']['altpkgrepo']['xmlrpcbaseurl'] = $_POST['pkgrepourl']; - } else { - unset($config['system']['altpkgrepo']['enable']); - } - write_config(); - } - - write_config(); -} - -$curcfg = $config['system']['altpkgrepo']; -$closehead = false; -$pgtitle = array(gettext("System"), gettext("Package Settings")); -include("head.inc"); - -// Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 -if (!verify_all_package_servers()) - print_info_box(package_server_mismatch_message()); - -// Print package server SSL warning. See https://redmine.pfsense.org/issues/484 -if (check_package_server_ssl() === false) - print_info_box(package_server_ssl_failure_message()); - -if ($savemsg) - print_info_box($savemsg); - -$tab_array = array(); -$tab_array[] = array(sprintf(gettext("%s packages"), $g['product_version']), false, "pkg_mgr.php"); -$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php"); -$tab_array[] = array(gettext("Package Settings"), true, "pkg_mgr_settings.php"); -display_top_tabs($tab_array); - -print_info_box(gettext('This page allows an alternate package repository to be configured, primarily for temporary use as a testing mechanism.' . - 'The contents of unofficial packages servers cannot be verified and may contain malicious files.' . - 'The package server settings should remain at their default values to ensure that verifiable and trusted packages are recevied.' . - 'A warning is printed on the Dashboard and in the package manager when an unofficial package server is in use.'), 'default'); - -require_once('classes/Form.class.php'); - -$form = new Form(); - -$section = new Form_Section('Alternate package repository'); - -$section->addInput(new Form_Checkbox( - 'alturlenable', - 'Enable Alternate', - 'Use a non-official server for packages', - $curcfg['enable'] -))->toggles('.form-group:not(:first-child)'); - -$section->addInput(new Form_Input( - 'pkgrepourl', - 'Package Repository URL', - 'text', - $curcfg['xmlrpcbaseurl'] ? $curcfg['xmlrpcbaseurl'] : $g[''] -))->setHelp(sprintf("This is where %s will check for packages when the",$g['product_name']) . - '<a href="pkg_mgr.php">' . ' ' . 'System: Packages' . ' </a>' . 'page is viewed.'); - -$form->add($section); -print($form); - -include("foot.inc"); diff --git a/src/usr/local/www/xmlrpc.php b/src/usr/local/www/xmlrpc.php index 5fd022a..00b167b 100755 --- a/src/usr/local/www/xmlrpc.php +++ b/src/usr/local/www/xmlrpc.php @@ -442,28 +442,7 @@ function interfaces_carp_configure_xmlrpc($raw_params) { } /*****************************/ -$check_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion."); - -$check_firmware_version_sig = array( - array( - $XML_RPC_String, - $XML_RPC_String - ) -); - -function check_firmware_version_xmlrpc($raw_params) { - global $xmlrpc_g, $XML_RPC_String; - - $params = xmlrpc_params_to_php($raw_params); - if (!xmlrpc_auth($params)) { - xmlrpc_authfail(); - return $xmlrpc_g['return']['authfail']; - } - return new XML_RPC_Response(new XML_RPC_Value(check_firmware_version(false), $XML_RPC_String)); -} - -/*****************************/ -$pfsense_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion."); +$pfsense_firmware_version_doc = gettext("Basic XMLRPC wrapper for host_firmware_version. This function will return the output of host_firmware_version upon completion."); $pfsense_firmware_version_sig = array ( array ( @@ -559,9 +538,6 @@ $server = new XML_RPC_Server( 'pfsense.merge_installedpackages_section_xmlrpc' => array('function' => 'merge_installedpackages_section_xmlrpc', 'signature' => $merge_config_section_sig, 'docstring' => $merge_config_section_doc), - 'pfsense.check_firmware_version' => array('function' => 'check_firmware_version_xmlrpc', - 'signature' => $check_firmware_version_sig, - 'docstring' => $check_firmware_version_doc), 'pfsense.host_firmware_version' => array('function' => 'pfsense_firmware_version_xmlrpc', 'signature' => $pfsense_firmware_version_sig, 'docstring' => $host_firmware_version_doc), |