Skip to content

Commit

Permalink
Make --authgroup work for Juniper
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Feb 2, 2015
1 parent f3d22e2 commit 627e557
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion oncp.c
Expand Up @@ -151,6 +151,8 @@ static int parse_select_node(struct openconnect_info *vpninfo, struct oc_auth_fo
xmlnode_get_prop(node, "name", &opt->form.name);
opt->form.label = strdup(opt->form.name);
opt->form.type = OC_FORM_OPT_SELECT;
if (!strcmp(opt->form.name, "realm"))
form->authgroup_opt = opt;

for (child = node->children; child; child = child->next) {
if (!child->name || strcasecmp((const char *)child->name, "option"))
Expand Down Expand Up @@ -522,7 +524,9 @@ int oncp_obtain_cookie(struct openconnect_info *vpninfo)
break;
}

ret = process_auth_form(vpninfo, form);
do {
ret = process_auth_form(vpninfo, form);
} while (ret == OC_FORM_RESULT_NEWGROUP);
if (ret)
goto out;

Expand Down

0 comments on commit 627e557

Please sign in to comment.