Remove Requires on separate package python-krbV in client

We need the configured kerberos realm so we can clean up /etc/krb5.keytab.
We have this already in /etc/ipa/default.conf so use that instead of
requiring a whole other python package to do it.
This commit is contained in:
Rob Crittenden
2010-06-01 14:24:37 -04:00
parent 3f5b4233cb
commit dbd1f50111
2 changed files with 10 additions and 4 deletions

View File

@@ -23,7 +23,6 @@ try:
import sys
import os
import krbV
import socket
import logging
import tempfile
@@ -36,6 +35,7 @@ try:
from ipapython import sysrestore
from ipapython import version
import SSSDConfig
from ConfigParser import RawConfigParser
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the required Python modules. The
@@ -204,8 +204,12 @@ def uninstall(options):
print "Removing Kerberos service principals from /etc/krb5.keytab"
try:
ctx = krbV.default_context()
run(["/usr/sbin/ipa-rmkeytab", "-k", "/etc/krb5.keytab", "-r", ctx.default_realm])
parser = RawConfigParser()
fp = open('/etc/ipa/default.conf', 'r')
parser.readfp(fp)
fp.close()
realm = parser.get('global', 'realm')
run(["/usr/sbin/ipa-rmkeytab", "-k", "/etc/krb5.keytab", "-r", realm])
except:
print "Failed to clean up /etc/krb5.keytab"

View File

@@ -130,7 +130,6 @@ Summary: IPA authentication for use on clients
Group: System Environment/Base
Requires: %{name}-python = %{version}-%{release}
Requires: python-ldap
Requires: python-krbV
Requires: cyrus-sasl-gssapi
Requires: ntp
Requires: krb5-workstation
@@ -497,6 +496,9 @@ fi
%endif
%changelog
* Tue Jun 1 2010 Rob Crittenden <rcritten@redhat.com> - 1.99-22
- Drop Requires of python-krbV on ipa-client
* Mon May 17 2010 Rob Crittenden <rcritten@redhat.com> - 1.99-21
- Load ipa_dogtag.pp in post install