Browse Source

openconnect: Fix secondary password script overwriting primary

When specifying a secondary password script, the output should be appended to the temporary password file and shouldn't overwrite it. If you refer to the case where there is a static secondary password, you can see that the secondary password is appended. Without this fix, only the secondary password is passed to the `openconnect` session.

Signed-off-by: Frederick Morlock <FrederickGeek8@gmail.com>
lilik-openwrt-22.03
Frederick Morlock 4 years ago
parent
commit
5d85f5af63
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      net/openconnect/files/openconnect.sh

+ 1
- 1
net/openconnect/files/openconnect.sh View File

@ -115,7 +115,7 @@ proto_openconnect_setup() {
[ -n "$password2" ] && echo "$password2" >> "$pwfile" [ -n "$password2" ] && echo "$password2" >> "$pwfile"
} }
[ "$token_mode" = "script" ] && { [ "$token_mode" = "script" ] && {
$token_script > "$pwfile" 2> /dev/null || {
$token_script >> "$pwfile" 2> /dev/null || {
logger -t openconenct "Cannot get password from script '$token_script'" logger -t openconenct "Cannot get password from script '$token_script'"
proto_setup_failed "$config" proto_setup_failed "$config"
} }


Loading…
Cancel
Save