diff options
author | Martin Willi <martin@revosec.ch> | 2014-02-19 15:25:10 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-05-07 14:13:37 +0200 |
commit | e6e975ff9d0938b86f71e234372f58a0da002906 (patch) | |
tree | e60cd41572a3ba5e4be9053d97339f7b645d10a3 /src/libcharon/plugins/vici/vici_query.c | |
parent | 6efa792d22cebab24dba0b61181392bb7ef88609 (diff) | |
download | strongswan-e6e975ff9d0938b86f71e234372f58a0da002906.tar.bz2 strongswan-e6e975ff9d0938b86f71e234372f58a0da002906.tar.xz |
vici: Support missing groups option in auth config
Diffstat (limited to 'src/libcharon/plugins/vici/vici_query.c')
-rw-r--r-- | src/libcharon/plugins/vici/vici_query.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcharon/plugins/vici/vici_query.c b/src/libcharon/plugins/vici/vici_query.c index 6656abe38..59037b622 100644 --- a/src/libcharon/plugins/vici/vici_query.c +++ b/src/libcharon/plugins/vici/vici_query.c @@ -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); |