summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-07-16 17:45:47 +0200
committerSimo Sorce <ssorce@redhat.com>2011-07-21 08:19:53 -0400
commit5cce63203779c688a975d593d4f0d8ff3228e040 (patch)
tree4442fe9477abed2024046267f8f4fa913c8b24f8
parenta9fac774429097a8cf8c945fab94768fc7e87c05 (diff)
downloadsssd-5cce63203779c688a975d593d4f0d8ff3228e040.tar.gz
sssd-5cce63203779c688a975d593d4f0d8ff3228e040.tar.bz2
sssd-5cce63203779c688a975d593d4f0d8ff3228e040.zip
Only print server address if one is available
-rw-r--r--src/providers/data_provider_fo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index 3d726da1..d4e04983 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -436,6 +436,13 @@ static void be_resolve_server_done(struct tevent_req *subreq)
struct resolv_hostent *srvaddr;
char ipaddr[128];
srvaddr = fo_get_server_hostent(state->srv);
+ if (!srvaddr) {
+ DEBUG(3, ("FATAL: No hostent available for server (%s)\n",
+ fo_get_server_name(state->srv)));
+ tevent_req_error(req, EFAULT);
+ return;
+ }
+
inet_ntop(srvaddr->family, srvaddr->addr_list[0]->ipaddr,
ipaddr, 128);