Blame SOURCES/authconfig-6.2.8-ldapbase.patch

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