From 405325c64db4d0ec49564c17bdb1ac9b15fb2243 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Tue, 31 Dec 2013 11:29:25 -0800 Subject: [PATCH] auth: Save a pointer to the group_list dropdown option if it exists This will eventually be used to implement the NEWGROUP feature. Signed-off-by: Kevin Cernekee --- auth.c | 4 ++++ openconnect-internal.h | 2 ++ openconnect.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/auth.c b/auth.c index ef83a737..26eb9ff8 100644 --- a/auth.c +++ b/auth.c @@ -169,6 +169,10 @@ static int parse_auth_choice(struct openconnect_info *vpninfo, struct oc_auth_fo choice->override_label = (char *)xmlGetProp(xml_node, (unsigned char *)"override-label"); } + if (!strcmp(opt->form.name, "group_list")) { + form->authgroup_opt = opt; + } + /* We link the choice _first_ so it's at the top of what we present to the user */ opt->form.next = form->opts; diff --git a/openconnect-internal.h b/openconnect-internal.h index 8ce17810..360105a8 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -27,6 +27,8 @@ #ifndef __OPENCONNECT_INTERNAL_H__ #define __OPENCONNECT_INTERNAL_H__ +#define __OPENCONNECT_PRIVATE__ + #include "openconnect.h" #if defined(OPENCONNECT_OPENSSL) || defined(DTLS_OPENSSL) diff --git a/openconnect.h b/openconnect.h index d48bc256..18179a6a 100644 --- a/openconnect.h +++ b/openconnect.h @@ -129,6 +129,9 @@ struct oc_auth_form { char *method; char *action; struct oc_form_opt *opts; +#ifdef __OPENCONNECT_PRIVATE__ + struct oc_form_opt_select *authgroup_opt; +#endif }; /****************************************************************************/