diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/util/util.c | 25 | ||||
-rw-r--r-- | src/util/util.h | 10 |
2 files changed, 29 insertions, 6 deletions
diff --git a/src/util/util.c b/src/util/util.c index 67f9880dc..39275ef8f 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -473,9 +473,15 @@ static void hash_talloc_free(void *ptr, void *pvt) talloc_free(ptr); } -errno_t sss_hash_create(TALLOC_CTX *mem_ctx, - unsigned long count, - hash_table_t **tbl) +errno_t sss_hash_create_ex(TALLOC_CTX *mem_ctx, + unsigned long count, + hash_table_t **tbl, + unsigned int directory_bits, + unsigned int segment_bits, + unsigned long min_load_factor, + unsigned long max_load_factor, + hash_delete_callback *delete_callback, + void *delete_private_data) { errno_t ret; hash_table_t *table; @@ -487,9 +493,10 @@ errno_t sss_hash_create(TALLOC_CTX *mem_ctx, return ENOMEM; } - hret = hash_create_ex(count, &table, 0, 0, 0, 0, - hash_talloc, hash_talloc_free, - internal_ctx, NULL, NULL); + hret = hash_create_ex(count, &table, directory_bits, segment_bits, + min_load_factor, max_load_factor, + hash_talloc, hash_talloc_free, internal_ctx, + delete_callback, delete_private_data); switch (hret) { case HASH_SUCCESS: /* Steal the table pointer onto the mem_ctx, @@ -517,6 +524,12 @@ errno_t sss_hash_create(TALLOC_CTX *mem_ctx, return ret; } +errno_t sss_hash_create(TALLOC_CTX *mem_ctx, unsigned long count, + hash_table_t **tbl) +{ + return sss_hash_create_ex(mem_ctx, count, tbl, 0, 0, 0, 0, NULL, NULL); +} + errno_t sss_filter_sanitize(TALLOC_CTX *mem_ctx, const char *input, char **sanitized) diff --git a/src/util/util.h b/src/util/util.h index 12d3ff0a5..f1e11a847 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -357,6 +357,16 @@ errno_t sss_hash_create(TALLOC_CTX *mem_ctx, unsigned long count, hash_table_t **tbl); +errno_t sss_hash_create_ex(TALLOC_CTX *mem_ctx, + unsigned long count, + hash_table_t **tbl, + unsigned int directory_bits, + unsigned int segment_bits, + unsigned long min_load_factor, + unsigned long max_load_factor, + hash_delete_callback *delete_callback, + void *delete_private_data); + /* Copy a NULL-terminated string list * Returns NULL on out of memory error or invalid input */ |