summaryrefslogtreecommitdiffstats
path: root/usr/local/www/xmlrpc.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-26 07:09:31 +0000
committerColin Smith <colin@pfsense.org>2005-03-26 07:09:31 +0000
commit07a7b08f283c996cc0b770b661fd7980b55302d8 (patch)
treedd811ce7bc574176a719df1f395b044f51ac44f9 /usr/local/www/xmlrpc.php
parent74adcf1303a6517b9a7e52c7272acdc75e7a45b5 (diff)
downloadpfsense-07a7b08f283c996cc0b770b661fd7980b55302d8.zip
pfsense-07a7b08f283c996cc0b770b661fd7980b55302d8.tar.gz
Expose filter_configure().
Diffstat (limited to 'usr/local/www/xmlrpc.php')
-rwxr-xr-xusr/local/www/xmlrpc.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 8901123..a19d478 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -94,14 +94,28 @@ function restore_config_section_xmlrpc($raw_params) {
return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
}
+$filter_configure_doc = 'Basic XMLRPC wrapper for filter_configure. This method must be called with one paramater: a string containing the local system\'s password. This function returns true upon completion.';
+$filter_configure_sig = array(array(boolean, string));
+
+function filter_configure_xmlrpc($raw_params) {
+ global $config;
+ $params = xmlrpc_params_to_php($raw_params);
+ if(crypt($params[0], $config['system']['password']) != $config['system']['password']) return; // Basic authentication.
+ filter_configure();
+ return new XML_PRC_Response(new XML_RPC_Value(true, 'boolean'));
+}
+
$server = new XML_RPC_Server(
array(
- 'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc',
+ 'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc',
'signature' => $backup_config_section_sig,
'docstring' => $backup_config_section_doc),
'pfsense.restore_config_section' => array('function' => 'restore_config_section_xmlrpc',
'signature' => $restore_config_section_sig,
- 'docstring' => $restore_config_section_doc)
+ 'docstring' => $restore_config_section_doc),
+ 'pfsense.filter_configure' => array('function' => 'filter_configure_xmlrpc',
+ 'signature' => $filter_configure_sig,
+ 'docstring' => $filter_configure_doc)
)
);
?>
OpenPOWER on IntegriCloud