svn rev #24860: trunk/src/lib/krb5/keytab/

ghudson@MIT.EDU ghudson at MIT.EDU
Fri Apr 8 13:45:07 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=24860
Commit By: ghudson
Log Message:
Correctly recognize non-iterable keytabs in k5_kt_get_principal().



Changed Files:
U   trunk/src/lib/krb5/keytab/ktfns.c
Modified: trunk/src/lib/krb5/keytab/ktfns.c
===================================================================
--- trunk/src/lib/krb5/keytab/ktfns.c	2011-04-08 16:50:13 UTC (rev 24859)
+++ trunk/src/lib/krb5/keytab/ktfns.c	2011-04-08 17:45:07 UTC (rev 24860)
@@ -118,9 +118,11 @@
     krb5_keytab_entry kte;
 
     *princ_out = NULL;
+    if (keytab->ops->start_seq_get == NULL)
+        return KRB5_KT_NOTFOUND;
     ret = krb5_kt_start_seq_get(context, keytab, &cursor);
     if (ret)
-        return KRB5_KT_NOTFOUND;
+        return ret;
     ret = krb5_kt_next_entry(context, keytab, &kte, &cursor);
     (void)krb5_kt_end_seq_get(context, keytab, &cursor);
     if (ret)




More information about the cvs-krb5 mailing list