summaryrefslogtreecommitdiffstats
path: root/freeipa.spec.in
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-31 10:15:28 +0100
committerRob Crittenden <rcritten@redhat.com>2012-12-06 10:54:29 -0500
commita35d4dcbfd187f0406db11c1f6d18ca2827b60a0 (patch)
tree55727f8118453ab9a9bbce93d84d9725e6565049 /freeipa.spec.in
parentb64dc9362defcddd524d9168fe89c732e4c17054 (diff)
downloadfreeipa-a35d4dcbfd187f0406db11c1f6d18ca2827b60a0.tar.gz
freeipa-a35d4dcbfd187f0406db11c1f6d18ca2827b60a0.tar.xz
freeipa-a35d4dcbfd187f0406db11c1f6d18ca2827b60a0.zip
Add the includedir to krb5.conf on upgrades
https://fedorahosted.org/freeipa/ticket/3132
Diffstat (limited to 'freeipa.spec.in')
-rw-r--r--freeipa.spec.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index 879ae9951..3144a49b9 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -223,6 +223,7 @@ Requires: libsss_autofs
Requires: autofs
Requires: libnfsidmap
Requires: nfs-utils
+Requires(post): policycoreutils
Obsoletes: ipa-client >= 1.0
@@ -526,6 +527,21 @@ if [ $1 -eq 0 ]; then
fi
%endif # ! %{ONLY_CLIENT}
+%post client
+if [ $1 -gt 1 ] ; then
+ # Has the client been configured?
+ restore=0
+ test -f '/var/lib/ipa-client/sysrestore/sysrestore.index' && restore=$(wc -l '/var/lib/ipa-client/sysrestore/sysrestore.index' | awk '{print $1}')
+
+ if [ -f '/etc/sssd/sssd.conf' -a $restore -ge 2 ]; then
+ if ! egrep -q '/var/lib/sss/pubconf/krb5.include.d/' /etc/krb5.conf 2>/dev/null ; then
+ echo "includedir /var/lib/sss/pubconf/krb5.include.d/" > /etc/krb5.conf.ipanew
+ cat /etc/krb5.conf >> /etc/krb5.conf.ipanew
+ mv /etc/krb5.conf.ipanew /etc/krb5.conf
+ /sbin/restorecon /etc/krb5.conf
+ fi
+ fi
+fi
%if ! %{ONLY_CLIENT}
%files server -f server-python.list