summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-rmkeytab.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-client/ipa-rmkeytab.c')
-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)