summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-05-03 14:58:46 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-03 16:53:13 +0200
commite3db994ddc8eda225c4cc3c90e9c0bd82281faf6 (patch)
treec75f70b16b6d63549cdb2fb0c0b8c0d44814f7f5 /src
parent9b077d62370190de714c6dbef8881841ae9f2e02 (diff)
downloadsssd-e3db994ddc8eda225c4cc3c90e9c0bd82281faf6.tar.gz
sssd-e3db994ddc8eda225c4cc3c90e9c0bd82281faf6.tar.bz2
sssd-e3db994ddc8eda225c4cc3c90e9c0bd82281faf6.zip
fo_discover_servers_send: don't crash when backup_domain is NULL
Diffstat (limited to 'src')
-rw-r--r--src/providers/fail_over_srv.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/fail_over_srv.c b/src/providers/fail_over_srv.c
index 9ff3de98..96c8248f 100644
--- a/src/providers/fail_over_srv.c
+++ b/src/providers/fail_over_srv.c
@@ -295,6 +295,17 @@ static void fo_discover_servers_primary_done(struct tevent_req *subreq)
goto done;
}
+ if (state->backup_domain == NULL) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("No backup domain specified\n"));
+
+ if (ret == ERR_SRV_NOT_FOUND || ret == ERR_SRV_LOOKUP_ERROR) {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Unable to retrieve primary nor "
+ "backup servers [%d]: %s\n", ret, sss_strerror(ret)));
+ }
+
+ goto done;
+ }
+
if (strcasecmp(state->dns_domain, state->backup_domain) == 0) {
/* primary domain was unreachable, we will use servers from backup
* domain as primary */