From 04759b59e71c78ab23b84d13dd29d9c6dd680adb Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Mon, 15 Oct 2012 12:21:00 +0200 Subject: 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 --- src/util/util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util/util.h') diff --git a/src/util/util.h b/src/util/util.h index c15ca668..e4cb1a86 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -476,7 +476,8 @@ errno_t check_and_open_readonly(const char *filename, int *fd, const uid_t uid, /* from util.c */ int split_on_separator(TALLOC_CTX *mem_ctx, const char *str, - const char sep, bool trim, char ***_list, int *size); + const char sep, bool trim, bool skip_empty, + char ***_list, int *size); char **parse_args(const char *str); -- cgit