Blob Blame History Raw
diff -up authconfig-6.2.8/authinfo.py.ldapbase authconfig-6.2.8/authinfo.py
--- authconfig-6.2.8/authinfo.py.ldapbase	2014-09-29 15:15:55.000000000 +0200
+++ authconfig-6.2.8/authinfo.py	2014-09-29 15:27:57.504661297 +0200
@@ -188,6 +188,13 @@ def checkDN(value):
 		return False
 	return True
 
+def matchBaseLine(line, key):
+	value = matchKey(line, key)
+	if value:
+		return checkDN(value)
+	else:
+		return False
+
 # Check for a string in an nss configuration line.
 def checkNSS(configuration, candidate):
 	lst = configuration.split(":",1)
@@ -2636,7 +2643,7 @@ class AuthInfo:
 				elif matchLine(ls, host):
 					if self.ldapServer:
 						output += "#" + line 
-				elif matchLine(ls, base):
+				elif matchBaseLine(ls, base):
 					# If it's a 'base' line, insert ours instead.
 					if not wrotebasedn and self.ldapBaseDN:
 						output += base + " "