Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <cernekee@gmail.com>
  • Loading branch information
cernekee committed Dec 31, 2013
1 parent c804961 commit 405325c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions auth.c
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions openconnect-internal.h
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions openconnect.h
Expand Up @@ -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
};

/****************************************************************************/
Expand Down

0 comments on commit 405325c

Please sign in to comment.