summaryrefslogtreecommitdiff
path: root/src/util/sss_krb5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/sss_krb5.c')
-rw-r--r--src/util/sss_krb5.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 8180d73d..24229f8b 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -327,7 +327,14 @@ int sss_krb5_verify_keytab_ex(const char *principal, const char *keytab_name,
found = false;
while((krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){
- krb5_unparse_name(context, entry.principal, &kt_principal);
+ krberr = krb5_unparse_name(context, entry.principal, &kt_principal);
+ if (krberr) {
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ ("Could not parse keytab entry\n"));
+ sss_log(SSS_LOG_ERR, "Could not parse keytab entry\n");
+ return EIO;
+ }
+
if (strcmp(principal, kt_principal) == 0) {
found = true;
}