summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-01-20 11:48:24 -0500
committerRob Crittenden <rcritten@redhat.com>2010-01-20 17:02:50 -0500
commit2955c955acc8fc510c6183b92fb8ca1b29b823e2 (patch)
treedec302157d04ba6110a180e8d3352d3b723eaad7 /ipa-client
parent3a536353fb9c92d076063fa44b95e5230bd58fa6 (diff)
downloadfreeipa-2955c955acc8fc510c6183b92fb8ca1b29b823e2.tar.gz
freeipa-2955c955acc8fc510c6183b92fb8ca1b29b823e2.tar.xz
freeipa-2955c955acc8fc510c6183b92fb8ca1b29b823e2.zip
Stop looking when removing entries from a keytab.
keytab entries are locked when looping. Temporarily suspend the looping.
Diffstat (limited to 'ipa-client')
-rw-r--r--ipa-client/ipa-rmkeytab.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipa-client/ipa-rmkeytab.c b/ipa-client/ipa-rmkeytab.c
index 245c9f2db..62480474d 100644
--- a/ipa-client/ipa-rmkeytab.c
+++ b/ipa-client/ipa-rmkeytab.c
@@ -121,6 +121,11 @@ remove_realm(krb5_context context, krb5_keytab ktid, const char *realm, int debu
* the looping. */
krb5_kt_end_seq_get(context, ktid, &kt_cursor);
+
+ /* keytab entries are locked when looping. Temporarily suspend
+ * the looping. */
+ krb5_kt_end_seq_get(context, ktid, &kt_cursor);
+
if (strstr(entry_princ_s, realm) != NULL) {
rval = remove_principal(context, ktid, entry_princ_s, debug);
if (rval != 0)