diff options
author | Jeremy Allison <jra@samba.org> | 2004-07-06 23:42:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:08 -0500 |
commit | 4bdf914cba2a63d186138d1341a7260ad79da1f5 (patch) | |
tree | 98ea4c348e16d3461d6fcd76a439e8a10cf9fb58 /source | |
parent | e1364ff774b62f46c0f50864695da49972352126 (diff) | |
download | samba-4bdf914cba2a63d186138d1341a7260ad79da1f5.tar.gz samba-4bdf914cba2a63d186138d1341a7260ad79da1f5.tar.xz samba-4bdf914cba2a63d186138d1341a7260ad79da1f5.zip |
r1373: Fix from Guenther Deschner <gd@sernet.de> to ensure last error return is not invalid.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/libads/kerberos_keytab.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/libads/kerberos_keytab.c b/source/libads/kerberos_keytab.c index 95152016b85..eec5f104fd9 100644 --- a/source/libads/kerberos_keytab.c +++ b/source/libads/kerberos_keytab.c @@ -479,7 +479,7 @@ int ads_keytab_create_default(ADS_STRUCT *ads) ret = krb5_kt_start_seq_get(context, keytab, &cursor); if (ret != KRB5_KT_END && ret != ENOENT ) { - while ((ret = krb5_kt_next_entry(context, keytab, &kt_entry, &cursor)) == 0) { + while (krb5_kt_next_entry(context, keytab, &kt_entry, &cursor) == 0) { if (kt_entry.vno != kvno) { char *ktprinc = NULL; char *p; @@ -516,6 +516,7 @@ int ads_keytab_create_default(ADS_STRUCT *ads) smb_krb5_kt_free_entry(context, &kt_entry); ZERO_STRUCT(kt_entry); } + ret = 0; for (i = 0; oldEntries[i]; i++) { ret |= ads_keytab_add_entry(ads, oldEntries[i]); krb5_free_unparsed_name(context, oldEntries[i]); |