Created
February 3, 2012 22:33
-
-
Save ccammilleri/1733387 to your computer and use it in GitHub Desktop.
Patch for Duo Security's OpenVPN plugin to support password concatenation delimiting on rightmost comma (meant to be used with a modified OpenVPN auth-pam plugin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- duo_openvpn.py.bak 2011-11-01 12:16:36.000000000 -0500 | |
+++ duo_openvpn.py 2012-01-19 10:15:30.728361702 -0600 | |
@@ -162,6 +162,13 @@ | |
username = os.environ.get('username') | |
password = os.environ.get('password') | |
ipaddr = os.environ.get('ipaddr', '0.0.0.0') | |
+ | |
+ if "," in password: | |
+ passarray = password.split(',') | |
+ password = passarray[-1] | |
+ else: | |
+ log('no delimiter found (comma)') | |
+ failure(control) | |
if not control or not username or not password: | |
log('required environment variables not found') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment