aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect
diff options
context:
space:
mode:
authorMarco Gulino <marco@gulinux.net>2020-04-07 16:20:08 +0100
committerMarco Gulino <marco@gulinux.net>2020-04-29 22:37:11 +0100
commit6464166660326d5a95e8b0a78a8b0c84da6f176e (patch)
tree9c79eeeb66031778f2711d059537ba6d9f8394d1 /net/openconnect
parentca123aed63b9cbadab573fc367a0d4e4022a0a02 (diff)
openconnect: Allow to set `usergroup` option in OpenConnect
Just adding the extra option `-g|--usergroup <group>` (required by the VPN server I'm currently using) Signed-off-by: Marco Gulino <marco@gulinux.net>
Diffstat (limited to 'net/openconnect')
-rw-r--r--net/openconnect/Makefile2
-rw-r--r--net/openconnect/README2
-rwxr-xr-xnet/openconnect/files/openconnect.sh4
3 files changed, 6 insertions, 2 deletions
diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
index 73835a884..1f44978c4 100644
--- a/net/openconnect/Makefile
+++ b/net/openconnect/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=8.05
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
diff --git a/net/openconnect/README b/net/openconnect/README
index 29c807490..7ab2a69cd 100644
--- a/net/openconnect/README
+++ b/net/openconnect/README
@@ -12,6 +12,8 @@ config interface 'MYVPN'
option serverhash 'AE7FF6A0426F0A0CD0A02EB9EC3C5066FAEB0B25'
option defaultroute '0'
option authgroup 'DEFAULT'
+ # usergroup option, if required by some servers
+ # option usergroup 'USERGROUP'
# For second factor auth:
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 1f0c7aeed..0efa44418 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -19,6 +19,7 @@ proto_openconnect_init_config() {
proto_config_add_string "username"
proto_config_add_string "serverhash"
proto_config_add_string "authgroup"
+ proto_config_add_string "usergroup"
proto_config_add_string "password"
proto_config_add_string "password2"
proto_config_add_string "token_mode"
@@ -38,7 +39,7 @@ proto_openconnect_add_form_entry() {
proto_openconnect_setup() {
local config="$1"
- json_get_vars server port interface username serverhash authgroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper form_entry
+ json_get_vars server port interface username serverhash authgroup usergroup password password2 token_mode token_secret token_script os csd_wrapper mtu juniper form_entry
grep -q tun /proc/modules || insmod tun
ifname="vpn-$config"
@@ -77,6 +78,7 @@ proto_openconnect_setup() {
append_args --no-system-trust
}
[ -n "$authgroup" ] && append_args --authgroup "$authgroup"
+ [ -n "$usergroup" ] && append_args --usergroup "$usergroup"
[ -n "$username" ] && append_args -u "$username"
[ -n "$password" ] || [ "$token_mode" = "script" ] && {
umask 077