continue;
form_id = (char *)xmlGetProp(xml_node, (unsigned char *)"value");
+ if (!form_id)
+ form_id = (char *)xmlNodeGetContent(xml_node);
if (!form_id)
continue;
* <username><!-- same treatment as the old form options --></username>
* <password><!-- ditto -->
* </auth>
+ * <group-select><!-- name of selected authgroup --></group-select>
* <host-scan-token><!-- vpninfo->csd_ticket --></host-scan-token>
*/
goto bad;
for (opt = form->opts; opt; opt = opt->next) {
+ /* group_list: create a new <group-select> node under <config-auth> */
+ if (!strcmp(opt->name, "group_list")) {
+ if (!xmlNewTextChild(root, NULL, XCAST("group-select"), XCAST(opt->value)))
+ goto bad;
+ continue;
+ }
+
+ /* everything else: create <foo>user_input</foo> under <auth> */
if (!xmlNewTextChild(node, NULL, XCAST(opt->name), XCAST(opt->value)))
goto bad;
}