diff options
author | Michal Zidek <mzidek@redhat.com> | 2012-10-15 12:21:00 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-02 17:44:09 +0100 |
commit | 04759b59e71c78ab23b84d13dd29d9c6dd680adb (patch) | |
tree | de8f6137712f7fc8ade86a7a89bb96905db3a240 /src/responder | |
parent | fc647b8eb5bca901658dedf3dbda2f35c63a86f2 (diff) | |
download | sssd-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/responder')
-rw-r--r-- | src/responder/common/responder_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index c5d7577b..35381be8 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -167,7 +167,8 @@ errno_t csv_string_to_uid_array(TALLOC_CTX *mem_ctx, const char *cvs_string, char *endptr; struct passwd *pwd; - ret = split_on_separator(mem_ctx, cvs_string, ',', true, &list, &list_size); + ret = split_on_separator(mem_ctx, cvs_string, ',', true, false, + &list, &list_size); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("split_on_separator failed [%d][%s].\n", ret, strerror(ret))); |