From a3422e07fcea2d16d10c826306b4c4813ce7e96a Mon Sep 17 00:00:00 2001
From: Andrea Dell'Amico <adellam@isti.cnr.it>
Date: Sat, 15 Oct 2016 15:30:24 +0200
Subject: [PATCH] infrastructure-services: Fix the openvpn variables.

---
 openvpn/templates/auth-ldap.pl.j2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openvpn/templates/auth-ldap.pl.j2 b/openvpn/templates/auth-ldap.pl.j2
index 8bd14ae..12ec825 100644
--- a/openvpn/templates/auth-ldap.pl.j2
+++ b/openvpn/templates/auth-ldap.pl.j2
@@ -31,7 +31,7 @@ $ldap = Net::LDAP->new($opt_uri) or die("LDAP connect to $opt_uri failed!");
 {% endif %}
 
 {% if openvpn_ldap_nonanon_bind %}
-$result = $ldap->bind('{{ openvpn_ldap_binddn }}', password => '{{ openvpn_ldap_bindpwd }}');
+$result = $ldap->bind('{{ openvpn_ldap_binddn }}', password => '{{ openvpn_ldap_bindpwd | default('') }}');
 {% else %}
 $result = $ldap->bind($opt_binddn, password => $opt_passwd);
 {% endif %}