]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
one more patch to GP login argument handling
authorDaniel Lenski <dlenski@gmail.com>
Tue, 15 Aug 2017 16:19:27 +0000 (09:19 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Feb 2018 15:27:03 +0000 (16:27 +0100)
Alexander Kurilo (https://github.com/kamazee) figured out the meaning of this one

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
auth-globalprotect.c

index 998308b74d229426cd90739d5d2f7f15b3091bd6..1e7c854913a1c6ec9cb1559bd9657945d6f1c97c 100644 (file)
@@ -103,7 +103,7 @@ static const struct gp_login_arg gp_login_args[] = {
        { .opt="unknown-arg10", .show=1 },
        { .opt="unknown-arg11", .show=1 },
        { .opt="connection-type", .err_missing=1, .check="tunnel" },
-       { .opt="minus1", .err_missing=1, .check="-1" },
+       { .opt="password-expiration-days", .show=1 },   /* days until password expires, if not -1 */
        { .opt="clientVer", .err_missing=1, .check="4100" },
        { .opt="preferred-ip", .save=1 },
        { .opt=NULL },
@@ -129,7 +129,7 @@ static int parse_login_xml(struct openconnect_info *vpninfo, xmlNode *xml_node)
                else if (xml_node) {
                        /* XX: Could we just use xml_node->content here? */
                        value = (char *)xmlNodeGetContent(xml_node);
-                       if (value && (!value[0] || !strcmp(value, "(null)"))) {
+                       if (value && (!value[0] || !strcmp(value, "(null)") || !strcmp(value, "-1"))) {
                                free(value);
                                value = NULL;
                        }