diff options
author | Parménides GV <parmegv@sdf.org> | 2014-08-18 18:22:54 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-08-18 18:22:54 +0200 |
commit | 31f6eab32a26a658cbfb2db0d457cc1f87d23f0f (patch) | |
tree | 75f372ff22a94102ef2f9bd163febf54ac45e9d6 /ics-openvpn-stripped/main/openvpn/sample/sample-scripts/ucn.pl | |
parent | 6057466bc8b4475bf4564b9143c60753c90f9aaa (diff) | |
parent | 7d8cde4f7ae769a3b6a25483d8bd0bb6c1551af9 (diff) |
Merge branch 'develop'
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); |