summaryrefslogtreecommitdiffstats
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 09:25:08 -0400
commit7ab6b051b768cca5823886eaafbb2e230b86c8f0 (patch)
treefc7b6f488ddee7e4ca9b7cc8e0b6737208cc3d17
parent71c816362b52626977e32c90dcde5b9602a8d0d2 (diff)
downloadsssd-7ab6b051b768cca5823886eaafbb2e230b86c8f0.tar.gz
sssd-7ab6b051b768cca5823886eaafbb2e230b86c8f0.tar.xz
sssd-7ab6b051b768cca5823886eaafbb2e230b86c8f0.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 58468c820..cb14012c1 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -456,6 +456,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);