From: François Grenier Date: Fri, 13 Jan 2017 01:25:12 +0000 (-0500) Subject: juniper: Support 'username' form input type X-Git-Tag: v8.00~129 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fdaba772b27d66f92a3d035d18d7b4e15292f6b9;p=users%2Fdwmw2%2Fopenconnect.git juniper: Support 'username' form input type https://bugzilla.redhat.com/show_bug.cgi?id=1412021 Signed-off-by: François Grenier Signed-off-by: David Woodhouse --- diff --git a/auth-juniper.c b/auth-juniper.c index 4b889d6b..eee85d2f 100644 --- a/auth-juniper.c +++ b/auth-juniper.c @@ -122,6 +122,13 @@ static int parse_input_node(struct openconnect_info *vpninfo, struct oc_auth_for ret = -ENOMEM; goto out; } + } else if (!strcasecmp(type, "username")) { + opt->type = OC_FORM_OPT_TEXT; + xmlnode_get_prop(node, "name", &opt->name); + if (asprintf(&opt->label, "%s:", opt->name) == -1) { + ret = -ENOMEM; + goto out; + } } else if (!strcasecmp(type, "submit")) { xmlnode_get_prop(node, "name", &opt->name); if (opt->name && (!strcmp(opt->name, submit_button) ||