Actions
Bug #11582
closedFreeRADIUS XML-RPC Sync doesn't sync all configuration sections
Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
FreeRADIUS
Target version:
-
Start date:
03/01/2021
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
Description
Using the XML-RPC Sync feature of the FreeRADIUS package doesn't sync all configuration sections.
For example:- tab
Users
is correctly synced. - tab
MACs
is correctly synced. - tab
NAS / Clients
is correctly synced.
Interfaces
Settings
EAP
(I did not test the other tabs.)
I did some digging into the FreeRADIUS
package source code, and found the following (some code is omitted):
function freeradius_do_xmlrpc_sync($sync_to_ip, $username, $password, $varsyncport, $varsyncprotocol, $varsynctimeout) {
// [... some omitted code ...]
/* XML will hold the sections to sync. */
$xml = array();
$xml['freeradius'] = $config['installedpackages']['freeradius'];
$xml['freeradiusauthorizedmacs'] = $config['installedpackages']['freeradiusauthorizedmacs'];
$xml['freeradiusclients'] = $config['installedpackages']['freeradiusclients'];
$execcmd = "require_once('/usr/local/pkg/freeradius.inc');\n";
$execcmd .= "freeradius_all_after_XMLRPC_resync();";
// [... some omitted code ...]
}
So the behavior matches the code.This method synchronizes only the sections :
freeradius
freeradiusauthorizedmacs
(which holds settings from theMACs
tab)freeradiusclients
(which holds settings from theNAS / Clients
tab)
freeradiuseapconf
(which holds settings from theEAP
tab)freeradiusinterfaces
(which holds settings from theInterfaces
tab)freeradiusinterfaces
(which holds settings from theSettings
tab)freeradiussync
(this one I understand why it's omitted: in order to avoid a sync loop)
I manually edited the source code to make it sync the missing sections, and it seems to work well (at least, the configuration is well-synced).
It there a reason why these 3 sections (freeradiuseapconf
, freeradiusinterfaces
, freeradiusinterfaces
) are omitted from the synchronization mechanism ?
Files
Actions