Skip to content

Commit

Permalink
Environment variable 'UCSF_VPN_VERSION=x.y.z' is now passed to OpenCo…
Browse files Browse the repository at this point in the history
…nnect
  • Loading branch information
HenrikBengtsson committed May 17, 2024
1 parent feeeed1 commit f67f56d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ ucsf-vpn
... a password is required` event in the `/var/log/auth.log` log
file, which in turn might trigger an security alert. The default
can be controlled via environment variable `UCSF_VPN_PRESUDO`.

* Environment variable `UCSF_VPN_VERSION=x.y.z` is now passed to
OpenConnect.

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Useful resources:
* UCSF Managing Your Passwords:
- https://it.ucsf.edu/services/managing-your-passwords
Version: 5.7.0-9024
Version: 5.7.0-9027
Copyright: Henrik Bengtsson (2016-2024)
License: GPL (>= 2.1) [https://www.gnu.org/licenses/gpl.html]
Source: https://github.com/HenrikBengtsson/ucsf-vpn
Expand Down
11 changes: 5 additions & 6 deletions bin/ucsf-vpn
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
### * UCSF Managing Your Passwords:
### - https://it.ucsf.edu/services/managing-your-passwords
###
### Version: 5.7.0-9025
### Version: 5.7.0-9027
### Copyright: Henrik Bengtsson (2016-2024)
### License: GPL (>= 2.1) [https://www.gnu.org/licenses/gpl.html]
### Source: https://github.com/HenrikBengtsson/ucsf-vpn
Expand Down Expand Up @@ -1324,7 +1324,7 @@ function openconnect_start() {
mdebug "token: <not specified>"
fi
mdebug "opts: [n=${#opts[@]}] ${opts[*]}"
mdebug "call: sudo openconnect ${opts[*]} --authgroup=\"$realm\""
mdebug "call: sudo UCSF_VPN_VERSION=$(version) openconnect ${opts[*]} --authgroup=\"$realm\""

if [[ $token == "push" ]]; then
mnote "Open the Duo Mobile app on your smartphone or tablet to confirm ..."
Expand Down Expand Up @@ -1359,10 +1359,10 @@ function openconnect_start() {
;;
esac
# shellcheck disable=SC2086
sudo echo -e "$two_pwds" | sudo openconnect "${opts[@]}" --authgroup="$realm" 2> "$fh_stderr" 1> "$fh_stdout"
sudo echo -e "$two_pwds" | sudo UCSF_VPN_VERSION="$(version)" openconnect "${opts[@]}" --authgroup="$realm" 2> "$fh_stderr" 1> "$fh_stdout"
else
# shellcheck disable=SC2086
sudo openconnect "${opts[@]}" --authgroup="$realm" 2> "$fh_stderr" 1> "$fh_stdout"
sudo UCSF_VPN_VERSION="$(version)" openconnect "${opts[@]}" --authgroup="$realm" 2> "$fh_stderr" 1> "$fh_stdout"
fi

## Update IP-info file
Expand Down Expand Up @@ -1636,8 +1636,7 @@ verbose=false
validate=
dryrun=false
realm=
extras=()
extras+=("${UCSF_VPN_EXTRAS[@]}")
extras=("${UCSF_VPN_EXTRAS[@]}")
protocol=${UCSF_VPN_PROTOCOL:-nc}
gui=true
notification=false
Expand Down

0 comments on commit f67f56d

Please sign in to comment.