summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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]);