[krbdev.mit.edu #6319] klist -k throws end of key table warning
Zhanna Tsitkova via RT
rt-comment at krbdev.mit.edu
Mon Jan 12 09:38:36 EST 2009
diff -Nur -x '*~' -x '*.orig' -x '*.rej' -x '*.pbxbtree' -x '*.pbxindex' -x lha.mode1v3 -x lha.mode2v3 -x lha.pbxuser -x windows -x .DS_Store Kerberos.AEP-6.5fc1.orig/KerberosClients/klist/Sources/klist.c Kerberos.AEP-6.5fc1/KerberosClients/klist/Sources/klist.c
--- Kerberos.AEP-6.5fc1.orig/KerberosClients/klist/Sources/klist.c 2008-12-11 15:15:04.000000000 -0800
+++ Kerberos.AEP-6.5fc1/KerberosClients/klist/Sources/klist.c 2008-12-11 16:40:57.000000000 -0800
@@ -183,6 +183,10 @@
char *principal_name = NULL;
err = krb5_kt_next_entry (kcontext, kt, &entry, &cursor);
+ if (err == KRB5_KT_END) {
+ err = 0;
+ break;
+ }
if (!err) {
err = krb5_unparse_name (kcontext, entry.principal, &principal_name);
@@ -210,11 +214,10 @@
}
printmsg ("\n");
}
- printiferr (err, "while scanning keytab %s", keytab_name);
+ printiferr (err, "while scanning keytab %s", keytab_name);
if (principal_name) { krb5_free_unparsed_name (kcontext, principal_name); }
}
- if (err == KRB5_KT_END) { err = 0; }
if (!err) {
err = krb5_kt_end_seq_get (kcontext, kt, &cursor);
More information about the krb5-bugs
mailing list