diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-04-24 09:36:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:15 -0500 |
commit | c33f6b2c370379dfd010600adc59e7439f1318f7 (patch) | |
tree | 2ac36b3751796f05ecb45a2ecd03bd166ed7182f /source4/heimdal/lib/krb5/keytab_any.c | |
parent | 0eddf14b307e905663b95296aa695a10d3fb90f7 (diff) | |
download | samba-c33f6b2c370379dfd010600adc59e7439f1318f7.tar.gz samba-c33f6b2c370379dfd010600adc59e7439f1318f7.tar.bz2 samba-c33f6b2c370379dfd010600adc59e7439f1318f7.zip |
r15192: Update Samba4 to use current lorikeet-heimdal.
Andrew Bartlett
(This used to be commit f0e538126c5cb29ca14ad0d8281eaa0a715ed94f)
Diffstat (limited to 'source4/heimdal/lib/krb5/keytab_any.c')
-rw-r--r-- | source4/heimdal/lib/krb5/keytab_any.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/source4/heimdal/lib/krb5/keytab_any.c b/source4/heimdal/lib/krb5/keytab_any.c index 667788c69d..d5130aaad8 100644 --- a/source4/heimdal/lib/krb5/keytab_any.c +++ b/source4/heimdal/lib/krb5/keytab_any.c @@ -33,7 +33,7 @@ #include "krb5_locl.h" -RCSID("$Id: keytab_any.c,v 1.7 2002/10/21 13:36:59 joda Exp $"); +RCSID("$Id: keytab_any.c,v 1.8 2006/04/10 09:20:13 lha Exp $"); struct any_data { krb5_keytab kt; @@ -162,23 +162,22 @@ any_next_entry (krb5_context context, ret = krb5_kt_next_entry(context, ed->a->kt, entry, &ed->cursor); if (ret == 0) return 0; - else if (ret == KRB5_KT_END) { - ret2 = krb5_kt_end_seq_get (context, ed->a->kt, &ed->cursor); - if (ret2) - return ret2; - while ((ed->a = ed->a->next) != NULL) { - ret2 = krb5_kt_start_seq_get(context, ed->a->kt, &ed->cursor); - if (ret2 == 0) - break; - } - if (ed->a == NULL) { - krb5_clear_error_string (context); - return KRB5_KT_END; - } - } else + else if (ret != KRB5_KT_END) return ret; - } while (ret == KRB5_KT_END); - return ret; + + ret2 = krb5_kt_end_seq_get (context, ed->a->kt, &ed->cursor); + if (ret2) + return ret2; + while ((ed->a = ed->a->next) != NULL) { + ret2 = krb5_kt_start_seq_get(context, ed->a->kt, &ed->cursor); + if (ret2 == 0) + break; + } + if (ed->a == NULL) { + krb5_clear_error_string (context); + return KRB5_KT_END; + } + } while (1); } static krb5_error_code |