summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-08-02 17:17:46 -0400
committerjim-p <jimp@pfsense.org>2010-08-02 17:17:46 -0400
commit0ce726624dc1fbc4998ca85d79b27d810d88d5fb (patch)
tree7ac84e364d7e564bdd08093a2e609e6abcc9e0e3
parent62c4d0fb3ecaa43d51345c46240edf2f0a95552e (diff)
downloadpfsense-0ce726624dc1fbc4998ca85d79b27d810d88d5fb.zip
pfsense-0ce726624dc1fbc4998ca85d79b27d810d88d5fb.tar.gz
Optionally sync users and groups via xmlrpc. Fixes #650
-rwxr-xr-xetc/rc.filter_synchronize5
-rw-r--r--usr/local/pkg/carp_settings.xml7
-rwxr-xr-xusr/local/www/xmlrpc.php1
3 files changed, 13 insertions, 0 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize
index 0a6cdb8..ded772c 100755
--- a/etc/rc.filter_synchronize
+++ b/etc/rc.filter_synchronize
@@ -168,6 +168,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens
case 'cert':
case 'ca':
case 'user':
+ case 'group':
$xml['system'][$section] = $config_copy['system'][$section];
break;
default:
@@ -270,6 +271,10 @@ if (is_array($config['installedpackages']['carpsettings']['config'])) {
$mergesections[] = 'cert';
$mergesections[] = 'ca';
}
+ if ($carp['synchronizeusers'] != "") {
+ $mergesections[] = 'user';
+ $mergesections[] = 'group';
+ }
if ($carp['synchronizednsforwarder'] != "" and is_array($config['dnsmasq']))
$sections[] = 'dnsmasq';
if ($carp['synchronizeschedules'] != "" and is_array($config['schedules']))
diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml
index 97aee7a..0ebe98d 100644
--- a/usr/local/pkg/carp_settings.xml
+++ b/usr/local/pkg/carp_settings.xml
@@ -77,6 +77,12 @@
</description>
</field>
<field>
+ <fielddescr>Synchronize Users and Groups</fielddescr>
+ <fieldname>synchronizeusers</fieldname>
+ <description>When this option is enabled, this system will automatically sync the users and groups over to the other CARP host when changes are made.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Synchronize rules</fielddescr>
<fieldname>synchronizerules</fieldname>
<description>When this option is enabled, this system will automatically sync the firewall rules to the other CARP host when changes are made..</description>
@@ -192,3 +198,4 @@
filter_configure();
</custom_add_php_command_late>
</packagegui>
+
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index bb0559c..5daa29a 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -230,6 +230,7 @@ function filter_configure_xmlrpc($raw_params) {
openvpn_resync_all();
services_dhcpd_configure();
services_dnsmasq_configure();
+ local_sync_accounts();
return $xmlrpc_g['return']['true'];
}
OpenPOWER on IntegriCloud