summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-08-19 07:35:01 -0400
committerSimo Sorce <idra@samba.org>2010-08-19 11:28:12 -0400
commitcbe9f879afc7b212c1e105fcb54b4563d5f6dfe0 (patch)
treea89214805fa87a6a83e4c55bf75c1d461f0ecdea
parent861566c6d03a9040d0b791df80c845da9c537b8f (diff)
downloadsamba-cbe9f879afc7b212c1e105fcb54b4563d5f6dfe0.tar.gz
samba-cbe9f879afc7b212c1e105fcb54b4563d5f6dfe0.tar.bz2
samba-cbe9f879afc7b212c1e105fcb54b4563d5f6dfe0.zip
s3-ads: Fix wrong test in if statement
-rw-r--r--source3/include/krb5_protos.h2
-rw-r--r--source3/libads/kerberos_keytab.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source3/include/krb5_protos.h b/source3/include/krb5_protos.h
index e229a14412..7ac0f3ec7e 100644
--- a/source3/include/krb5_protos.h
+++ b/source3/include/krb5_protos.h
@@ -137,6 +137,8 @@ krb5_error_code smb_krb5_get_creds(const char *server_s,
krb5_creds **creds_p);
char *smb_krb5_principal_get_realm(krb5_context context,
krb5_principal principal);
+
+
#endif /* HAVE_KRB5 */
int cli_krb5_get_ticket(TALLOC_CTX *mem_ctx,
diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index 10c7087c96..94698c6cc2 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -56,7 +56,7 @@ static krb5_error_code seek_and_delete_old_entries(krb5_context context,
ZERO_STRUCT(zero_kt_entry);
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
- if (ret == KRB5_KT_END && ret == ENOENT ) {
+ if (ret == KRB5_KT_END || ret == ENOENT ) {
/* no entries */
return 0;
}