Set error string when there is no KDC for a realm.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21457 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -919,8 +919,10 @@ gethostlist(krb5_context context, const char *realm,
|
|||||||
|
|
||||||
while(krb5_krbhst_next(context, handle, &hostinfo) == 0)
|
while(krb5_krbhst_next(context, handle, &hostinfo) == 0)
|
||||||
nhost++;
|
nhost++;
|
||||||
if(nhost == 0)
|
if(nhost == 0) {
|
||||||
|
krb5_set_error_string(context, "No KDC found for realm %s", realm);
|
||||||
return KRB5_KDC_UNREACH;
|
return KRB5_KDC_UNREACH;
|
||||||
|
}
|
||||||
*hostlist = calloc(nhost + 1, sizeof(**hostlist));
|
*hostlist = calloc(nhost + 1, sizeof(**hostlist));
|
||||||
if(*hostlist == NULL) {
|
if(*hostlist == NULL) {
|
||||||
krb5_krbhst_free(context, handle);
|
krb5_krbhst_free(context, handle);
|
||||||
|
Reference in New Issue
Block a user