summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-07-06 23:42:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:08 -0500
commit12b0bd2aca1600a3b6e42b5a9d0a9ac0018c8444 (patch)
treeba4f27c7fdfda202df9297fee6812430ae6618ba
parent600e904aa1ddf620df2ed6e5a02d0fe00e627dbb (diff)
downloadsamba-12b0bd2aca1600a3b6e42b5a9d0a9ac0018c8444.tar.gz
samba-12b0bd2aca1600a3b6e42b5a9d0a9ac0018c8444.tar.bz2
samba-12b0bd2aca1600a3b6e42b5a9d0a9ac0018c8444.zip
r1373: Fix from Guenther Deschner <gd@sernet.de> to ensure last error return is not invalid.
Jeremy. (This used to be commit 4bdf914cba2a63d186138d1341a7260ad79da1f5)
-rw-r--r--source3/libads/kerberos_keytab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index 95152016b8..eec5f104fd 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/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]);