Blame SOURCES/authconfig-6.2.8-krb5-include.patch

ee2f06
diff -up authconfig-6.2.8/authinfo.py.krb5-include authconfig-6.2.8/authinfo.py
ee2f06
--- authconfig-6.2.8/authinfo.py.krb5-include	2015-07-03 11:52:58.000000000 +0200
ee2f06
+++ authconfig-6.2.8/authinfo.py	2015-07-03 12:47:44.993864700 +0200
ee2f06
@@ -109,6 +109,8 @@ PATH_PAM_SSS = AUTH_MODULE_DIR + "/pam_s
ee2f06
 
ee2f06
 PATH_LIBSSS_AUTOFS = "/usr" + LIBDIR + "/sssd/modules/libsss_autofs.so"
ee2f06
 
ee2f06
+PATH_KRB5_INCLUDEDIR = "/var/lib/sss/pubconf/krb5.include.d/"
ee2f06
+
ee2f06
 PATH_WINBIND_NET = "/usr/bin/net"
ee2f06
 PATH_IPA_CLIENT_INSTALL = "/usr/sbin/ipa-client-install"
ee2f06
 
ee2f06
@@ -3022,6 +3024,8 @@ class AuthInfo:
ee2f06
 		wroteourdomrealm = False
ee2f06
 		wrotedomrealm = False
ee2f06
 		wrotedomrealm2 = False
ee2f06
+		# No dir -> no incdir line, set as if already written
ee2f06
+		wroteincdir = not os.access(PATH_KRB5_INCLUDEDIR, os.R_OK)		
ee2f06
 		section = ""
ee2f06
 		subsection = ""
ee2f06
 		f = None
ee2f06
@@ -3043,6 +3047,12 @@ class AuthInfo:
ee2f06
 			for line in f.file:
ee2f06
 				ls = line.strip()
ee2f06
 
ee2f06
+				if matchLine(ls, "includedir " + PATH_KRB5_INCLUDEDIR):
ee2f06
+					if not wroteincdir:
ee2f06
+						wroteincdir = True
ee2f06
+					else:
ee2f06
+						# already written or should be removed
ee2f06
+						continue
ee2f06
 				# If this is the "kdc" in our realm, replace it with
ee2f06
 				# the values we now have.
ee2f06
 				if (section == "realms" and subsection and subsection == self.kerberosRealm
ee2f06
@@ -3132,6 +3142,9 @@ class AuthInfo:
ee2f06
 					continue
ee2f06
 				# If it's the beginning of a section, record its name.
ee2f06
 				if matchLine(ls, "["):
ee2f06
+					if not wroteincdir:
ee2f06
+						output += "includedir " + PATH_KRB5_INCLUDEDIR + "\n"
ee2f06
+						wroteincdir = True
ee2f06
 					# If the previous section was "realms", and we didn't
ee2f06
 					# see ours, write our realm out.
ee2f06
 					if (section == "realms" and self.kerberosRealm