summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-05-02 22:27:19 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-05-02 22:27:19 +0000
commit38275404072ed96dce3ca8a1e8a0385c47d8083a (patch)
tree555fb705d4e8e5b06f8cbf7823608e1ddc04e1df /etc/inc/filter.inc
parent9c9b18330c25d740640f55588263f78af40185c1 (diff)
downloadpfsense-38275404072ed96dce3ca8a1e8a0385c47d8083a.zip
pfsense-38275404072ed96dce3ca8a1e8a0385c47d8083a.tar.gz
Report correct syncing username.
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 4731aa3..c7661cd 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -3276,17 +3276,18 @@ 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);
- $cli->setCredentials('admin', $password);
+ $username = $config['system']['user'][0]['name'];
+ $cli->setCredentials($username, $password);
if($numberofruns == 1)
$cli->setDebug(1);
/* send our XMLRPC message and timeout after 240 seconds */
$resp = $cli->send($msg, "240");
if(!$resp) {
- $error = "A communications error occured while attempting XMLRPC sync with username admin {$url}:{$port}.";
+ $error = "A communications error occured while attempting XMLRPC sync with username {$username} {$url}:{$port}.";
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
} elseif($resp->faultCode()) {
- $error = "An error code was received while attempting XMLRPC sync with username admin {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
+ $error = "An error code was received while attempting XMLRPC sync with username {$username} {$url}:{$port} - Code " . $resp->faultCode() . ": " . $resp->faultString();
log_error($error);
file_notice("sync_settings", $error, "Settings Sync", "");
} else {
@@ -3368,7 +3369,8 @@ function carp_sync_client() {
carp_sync_xml($synchronizetoip, $carp['password'], $sections, $port);
$cli = new XML_RPC_Client('/xmlrpc.php', $synchronizetoip, $port);
$msg = new XML_RPC_Message('pfsense.filter_configure', array(new XML_RPC_Value($carp['password'], 'string')));
- $cli->setCredentials('admin', $carp['password']);
+ $username = $config['system']['user'][0]['name'];
+ $cli->setCredentials($username, $carp['password']);
$cli->send($msg, "900");
/* signal a carp reload */
$msg = new XML_RPC_Message('pfsense.interfaces_carp_configure');
@@ -3404,4 +3406,4 @@ function return_vpn_subnet($adr) {
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud