From c0e76182db5f7522b2485d0e30e58fe70affe424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 10 Jul 2007 12:53:25 +0000 Subject: [PATCH] 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 --- lib/krb5/krbhst.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/krb5/krbhst.c b/lib/krb5/krbhst.c index 1dcade1cd..98173d201 100644 --- a/lib/krb5/krbhst.c +++ b/lib/krb5/krbhst.c @@ -919,8 +919,10 @@ gethostlist(krb5_context context, const char *realm, while(krb5_krbhst_next(context, handle, &hostinfo) == 0) nhost++; - if(nhost == 0) + if(nhost == 0) { + krb5_set_error_string(context, "No KDC found for realm %s", realm); return KRB5_KDC_UNREACH; + } *hostlist = calloc(nhost + 1, sizeof(**hostlist)); if(*hostlist == NULL) { krb5_krbhst_free(context, handle);