diff options
author | Ermal <eri@pfsense.org> | 2011-03-30 20:52:13 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-03-30 20:52:36 +0000 |
commit | 47e5f74198c5b7a1dde6dd29a57dfe4ee85edb9c (patch) | |
tree | ac26a05bf7ce1aefe46a31bbe4df057adaffa6ed /etc/rc.filter_synchronize | |
parent | bfa992bc4eb8f8674f44b94e8617a032854356e9 (diff) | |
download | pfsense-47e5f74198c5b7a1dde6dd29a57dfe4ee85edb9c.zip pfsense-47e5f74198c5b7a1dde6dd29a57dfe4ee85edb9c.tar.gz |
By default assume admin user and do not blindly copy the first user from the config.xml
Diffstat (limited to 'etc/rc.filter_synchronize')
-rwxr-xr-x | etc/rc.filter_synchronize | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index 10ec73b..7039722 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -101,7 +101,8 @@ function carp_check_version($url, $password, $port = 80, $method = 'pfsense.host while ($numberofruns < 2) { $msg = new XML_RPC_Message($method, $params); $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); - $username = $config['system']['user'][0]['name']; + /* XXX: Configurable from the GUI?! */ + $username = "admin"; $cli->setCredentials($username, $password); if($numberofruns > 1) $cli->setDebug(1); @@ -235,7 +236,8 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens log_error("Beginning XMLRPC sync to {$url}:{$port}."); $msg = new XML_RPC_Message($method, $params); $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); - $username = $config['system']['user'][0]['name']; + /* XXX: Configurable from the GUI?! */ + $username = "admin"; $cli->setCredentials($username, $password); if($numberofruns > 1) $cli->setDebug(1); @@ -394,7 +396,8 @@ if (is_array($config['installedpackages']['carpsettings']['config'])) { ); $msg = new XML_RPC_Message('pfsense.filter_configure', $params); - $username = $config['system']['user'][0]['name']; + /* XXX: Configurable from the GUI */ + $username = "admin"; $cli->setCredentials($username, $carp['password']); $resp = $cli->send($msg, "900"); |