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/util/util.h | |
parent | fc647b8eb5bca901658dedf3dbda2f35c63a86f2 (diff) | |
download | sssd2-04759b59e71c78ab23b84d13dd29d9c6dd680adb.tar.gz sssd2-04759b59e71c78ab23b84d13dd29d9c6dd680adb.tar.xz sssd2-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/util/util.h')
-rw-r--r-- | src/util/util.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |