Can't connect to Juniper VPN when a 'Post Sign-In Message' is set

Katelyn Schiesser katelyn.schiesser at gmail.com
Thu Jul 7 15:09:51 PDT 2016


David,

I tested the command-line version and was able to connect, but it
looks like the message display code has an issue:

diff --git a/auth-juniper.c b/auth-juniper.c
index e975198..6ab46e8 100644
--- a/auth-juniper.c
+++ b/auth-juniper.c
@@ -247,7 +247,7 @@ static struct oc_auth_form *parse_form_node(struct
openconnect_info *vpninfo,
                } else if (!strcasecmp((char *)child->name, "textarea")) {
                        /* display the post sign-in message, if any */
                        char *fieldname = (char *)xmlGetProp(child,
(unsigned char *)"name");
-                       if (fieldname && !!strcasecmp(fieldname,
"sn-postauth-text")) {
+                       if (fieldname && !strcasecmp(fieldname,
"sn-postauth-text")) {
                                char *postauth_msg = (char
*)xmlNodeGetContent(child);
                                if (postauth_msg) {
                                        free(form->banner);

Note the double-bang. Once that was corrected, it showed he textarea
contents in the terminal as expected.

Unfortunately, I don't use NetworkManager - but I can see if a
colleague can try it out :)


-Katelyn

On Wed, Jul 6, 2016 at 8:47 AM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Mon, 2016-07-04 at 11:25 +0100, David Woodhouse wrote:
>> On Tue, 2016-06-14 at 16:16 -0700, Katelyn Schiesser wrote:
>> > Okay, I got it working. I didn't add any sort of interactive-ness, as
>> > I felt that would break the flow of things - especially if someone
>> > used -b/--background. Openconnect just assumes you want to press
>> > 'Proceed'. I also made it print whatever the Post Sign-in Message is
>> > set to.
>> >
>> >  Here is my patch - let me know if you want anything changed in it.
>> >
>> > Signed-off-by: Katelyn Schiesser <katelyn.schiesser at gmail.com>
>>
>> Please could you test the version I just pushed in commit 7a4140a1.
>
> Ideally also with NetworkManager if you can (see my post a few seconds ago).
>
> --
> dwmw2



More information about the openconnect-devel mailing list