vici: Support missing groups option in auth config
This commit is contained in:
@@ -539,6 +539,18 @@ static void build_auth_cfgs(peer_cfg_t *peer_cfg, bool local, vici_builder_t *b)
|
||||
}
|
||||
rules->destroy(rules);
|
||||
|
||||
b->begin_list(b, "groups");
|
||||
rules = auth->create_enumerator(auth);
|
||||
while (rules->enumerate(rules, &rule, &v))
|
||||
{
|
||||
if (rule == AUTH_RULE_GROUP)
|
||||
{
|
||||
b->add_li(b, "%Y", v.id);
|
||||
}
|
||||
}
|
||||
rules->destroy(rules);
|
||||
b->end_list(b);
|
||||
|
||||
b->end_section(b);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
Reference in New Issue
Block a user