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