diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/providers/ldap/ldap_init.c | 10 | ||||
-rw-r--r-- | src/util/util.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c index c00c0a9d..b4d844de 100644 --- a/src/providers/ldap/ldap_init.c +++ b/src/providers/ldap/ldap_init.c @@ -55,7 +55,7 @@ struct bet_ops sdap_access_ops = { }; /* Please use this only for short lists */ -errno_t check_order_list_for_duplicates(char **list, size_t len, +errno_t check_order_list_for_duplicates(char **list, bool case_sensitive) { size_t c; @@ -285,20 +285,20 @@ int sssm_ldap_access_init(struct be_ctx *bectx, order = "filter"; } - ret = split_on_separator(access_ctx, order, ',', true, &order_list, - &order_list_len); + ret = split_on_separator(access_ctx, order, ',', true, + &order_list, &order_list_len); if (ret != EOK) { DEBUG(1, ("split_on_separator failed.\n")); goto done; } - ret = check_order_list_for_duplicates(order_list, order_list_len, false); + ret = check_order_list_for_duplicates(order_list, false); if (ret != EOK) { DEBUG(1, ("check_order_list_for_duplicates failed.\n")); goto done; } - if (order_list_len -1 > LDAP_ACCESS_LAST) { + if (order_list_len > LDAP_ACCESS_LAST) { DEBUG(1, ("Currently only [%d] different access rules are supported.\n")); ret = EINVAL; goto done; diff --git a/src/util/util.c b/src/util/util.c index 649d58ea..b4b1b124 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -133,7 +133,7 @@ int split_on_separator(TALLOC_CTX *mem_ctx, const char *str, list[l] = NULL; /* terminate list */ - if (size) *size = l + 1; + if (size) *size = l; *_list = list; return EOK; |