]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
GlobalProtect: always set clientos=Windows in relevant requests, regardless of actual OS
authorDaniel Lenski <dlenski@gmail.com>
Wed, 5 Sep 2018 04:58:08 +0000 (21:58 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 21 Sep 2018 07:25:06 +0000 (07:25 +0000)
commit6cb2da23f4b2810cc8c5875449fccd22ec502be8
tree782a4ba8a2e87ed9b8fd37881b3849bfe93b9c37
parent7eda6529ed5371637621ed6ef8cc8f1aedf9a677
GlobalProtect: always set clientos=Windows in relevant requests, regardless of actual OS

I've tried, whenever possible not to lie to the server about the client
configuration.  However, there are now multiple cases where a GlobalProtect
server responds with a misleading error when the `ssl-vpn/login.esp` request doesn't
contain the exact, magic value of `clientos=Windows`.

* https://github.com/dlenski/openconnect/issues/86
  ("Assign private IP address failed" unless `clientos=Windows` in `ssl-vpn/login.esp` request)

* https://github.com/dlenski/openconnect/issues/116
  ("Invalid username or password" unless `clientos=Windows` in `ssl-vpn/login.esp` request)

These cases are very difficult to debug because they seem to be suggesting totally unrelated
errors.

For reliability, this patch makes openconnect always specify `clientos=Windows` in relevant
requests, regardless of the actual `vpninfo->platname`. (The `vpninfo->platname` value can
still be sent in the "free-form" `os-version` field, as far as I can tell.)

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
auth-globalprotect.c
gpst.c