summaryrefslogtreecommitdiff
path: root/src/providers/ad
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2012-10-15 12:21:00 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-01-02 17:44:09 +0100
commit04759b59e71c78ab23b84d13dd29d9c6dd680adb (patch)
treede8f6137712f7fc8ade86a7a89bb96905db3a240 /src/providers/ad
parentfc647b8eb5bca901658dedf3dbda2f35c63a86f2 (diff)
downloadsssd-04759b59e71c78ab23b84d13dd29d9c6dd680adb.tar.gz
sssd-04759b59e71c78ab23b84d13dd29d9c6dd680adb.tar.bz2
sssd-04759b59e71c78ab23b84d13dd29d9c6dd680adb.zip
failover: Protect against empty host names
Added new parameter to split_on_separator that allows to skip empty values. The whole function was rewritten. Unit test case was added to check the new implementation. https://fedorahosted.org/sssd/ticket/1484
Diffstat (limited to 'src/providers/ad')
-rw-r--r--src/providers/ad/ad_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ad/ad_common.c b/src/providers/ad/ad_common.c
index 8600dab2..dff1071d 100644
--- a/src/providers/ad/ad_common.c
+++ b/src/providers/ad/ad_common.c
@@ -156,7 +156,7 @@ ad_servers_init(TALLOC_CTX *mem_ctx,
if (!tmp_ctx) return ENOMEM;
/* Split the server list */
- ret = split_on_separator(tmp_ctx, servers, ',', true, &list, NULL);
+ ret = split_on_separator(tmp_ctx, servers, ',', true, true, &list, NULL);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to parse server list!\n"));
goto done;