Blame SOURCES/authconfig-6.2.8-ldapbase.patch

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