git.samba.org
/
abartlet
/
lorikeet-heimdal.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f79326e
)
Avoid kinit NPE when default cred not in keytab
author
Viktor Dukhovni
<viktor@twosigma.com>
Mon, 21 Jul 2014 21:00:19 +0000
(21:00 +0000)
committer
Viktor Dukhovni
<postfix-users@dukhovni.org>
Tue, 22 Jul 2014 21:57:17 +0000
(17:57 -0400)
kuser/kinit.c
patch
|
blob
|
history
diff --git
a/kuser/kinit.c
b/kuser/kinit.c
index 5e6046dce61f14664978614f2a4c0e4c314091d8..7e8a5aec113b15965f3515b3fc5f6b477e756c84 100644
(file)
--- a/
kuser/kinit.c
+++ b/
kuser/kinit.c
@@
-1131,7
+1131,10
@@
get_princ_kt(krb5_context context,
if (ret != 0 || (ret = krb5_kt_end_seq_get(context, kt, &cursor)) != 0)
krb5_err(context, 1, ret, "get_princ_kt");
if (!*principal)
- parse_name_realm(context, name, 0, NULL, principal);
+ if (name)
+ parse_name_realm(context, name, 0, NULL, principal);
+ else
+ krb5_err(context, 1, KRB5_CC_NOTFOUND, "get_princ_kt");
krb5_free_principal(context, tmp);
free(def_realm);