diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2010-01-09 15:10:15 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2010-01-09 15:10:15 -0500 |
commit | 5684694a60bdfe8d0dde575f694e908a7caff275 (patch) | |
tree | 30e1814708e54eda0e481e5e0055c44695fcdc24 /etc/rc.filter_synchronize | |
parent | b298dd06f9985d9543de099afa401d5019aad7f9 (diff) | |
download | pfsense-5684694a60bdfe8d0dde575f694e908a7caff275.zip pfsense-5684694a60bdfe8d0dde575f694e908a7caff275.tar.gz |
Report auth errors correctly during xmlrpc sync
Diffstat (limited to 'etc/rc.filter_synchronize')
-rwxr-xr-x | etc/rc.filter_synchronize | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize index af61f26..f821485 100755 --- a/etc/rc.filter_synchronize +++ b/etc/rc.filter_synchronize @@ -96,7 +96,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if (isset ($config_copy['nat']['advancedoutbound']['rule'][$x]['nosync'])) unset ($config_copy['nat']['advancedoutbound']['rule'][$x]); } - } + } if (is_array($config_copy['nat']['rule'])) { $natcnt = count($config_copy['nat']['rule']); for ($x = 0; $x < $natcnt; $x++) { @@ -120,7 +120,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if (isset ($config_copy['aliases']['alias'][$x]['nosync'])) unset ($config_copy['aliases']['alias'][$x]); } - } + } if (is_array($config_copy['dnsmasq']['hosts'])) { $dnscnt = count($config_copy['dnsmasq']['hosts']); for ($x = 0; $x < $dnscnt; $x++) { @@ -128,7 +128,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if (isset ($config_copy['dnsmasq']['hosts'][$x]['nosync'])) unset ($config_copy['dnsmasq']['hosts'][$x]); } - } + } if (is_array($config_copy['virtualip']['vip'])) { $vipcnt = count($config_copy['virtualip']['vip']); for ($x = 0; $x < $vipcnt; $x++) { @@ -136,7 +136,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if (isset ($config_copy['virtualip']['vip'][$x]['nosync']) or $config_copy['virtualip']['vip'][$x]['mode'] == "proxyarp") unset ($config_copy['virtualip']['vip'][$x]); } - } + } if (is_array($config_copy['ipsec']['tunnel'])) { $ipseccnt = count($config_copy['ipsec']['tunnel']); for ($x = 0; $x < $ipseccnt; $x++) { @@ -144,7 +144,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if (isset ($config_copy['ipsec']['tunnel'][$x]['nosync'])) unset ($config_copy['ipsec']['tunnel'][$x]); } - } + } foreach ($sections as $section) { /* we can't use array_intersect_key() @@ -184,6 +184,12 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens log_error("XMLRPC sync successfully completed with {$url}:{$port}."); $numberofruns = 3; } + $parsed_response = XML_RPC_Decode($resp->value()); + if(trim($parsed_response) == "Authentication failed") { + $error = "A authentication failure occurred while trying to access {$url}:{$port} (pfsense.exec_php)."; + log_error($error); + $numberofruns = 5; + } $numberofruns++; } } |