diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-26 07:09:31 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-26 07:09:31 +0000 |
commit | 07a7b08f283c996cc0b770b661fd7980b55302d8 (patch) | |
tree | dd811ce7bc574176a719df1f395b044f51ac44f9 /usr/local | |
parent | 74adcf1303a6517b9a7e52c7272acdc75e7a45b5 (diff) | |
download | pfsense-07a7b08f283c996cc0b770b661fd7980b55302d8.zip pfsense-07a7b08f283c996cc0b770b661fd7980b55302d8.tar.gz |
Expose filter_configure().
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/xmlrpc.php | 18 |
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) ) ); ?> |