mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
openconnect: add an option to support stoken
Add a new build configuration option for openconnect and let it link against libstoken if instructed to. Two new uci configuration variables are introduced: "token_mode" and "token_secret" to allow openconnect to use those. Signed-off-by: Florian Fainelli <florian@openwrt.org>
This commit is contained in:
@@ -17,7 +17,7 @@ proto_openconnect_init_config() {
|
||||
proto_openconnect_setup() {
|
||||
local config="$1"
|
||||
|
||||
json_get_vars server port username serverhash authgroup password vgroup
|
||||
json_get_vars server port username serverhash authgroup password vgroup token_mode token_secret
|
||||
|
||||
grep -q tun /proc/modules || insmod tun
|
||||
|
||||
@@ -57,6 +57,9 @@ proto_openconnect_setup() {
|
||||
append cmdline "--passwd-on-stdin"
|
||||
}
|
||||
|
||||
[ -n "$token_mode" ] && append cmdline "--token-mode=$token_mode"
|
||||
[ -n "$token_secret" ] && append cmdline "--token-secret=$token_secret"
|
||||
|
||||
proto_export INTERFACE="$config"
|
||||
logger -t openconnect "executing 'openconnect $cmdline'"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user