diff options
author | Parménides GV <parmegv@sdf.org> | 2014-07-31 12:09:49 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-07-31 12:09:49 +0200 |
commit | 0393ba6656ce6cf679a2c4663275b3ed0f1a34b9 (patch) | |
tree | f000311e97598ab3fc42e2bea23e6cb342ad166c /ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl | |
parent | b28eeb08e8ec3baafdd9388cc5b70c6c84db9cf1 (diff) |
Updated ics-openvpn to rev 859 + no 2nd notification.
Diffstat (limited to 'ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl')
-rwxr-xr-x | ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl b/ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl new file mode 100755 index 00000000..6d708f82 --- /dev/null +++ b/ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl -t + +# OpenVPN --auth-user-pass-verify script. +# Only authenticate if username equals common_name. +# In OpenVPN config file: +# auth-user-pass-verify ./ucn.pl via-env + +$username = $ENV{'username'}; +$common_name = $ENV{'common_name'}; + +exit !(length($username) > 0 && length($common_name) > 0 && $username eq $common_name); |