diff options
author | Simo Sorce <idra@samba.org> | 2006-02-04 06:57:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:45 -0500 |
commit | 04396c36d3ee8300b2b73ea8b43a45ea1b250828 (patch) | |
tree | 9f48c588c7faf2ace8b1ea0281cd3fd01d10af5f /source4/lib/db_wrap.c | |
parent | 88279373abc07fa50a969135eb5ecf58d6c40cc7 (diff) | |
download | samba-04396c36d3ee8300b2b73ea8b43a45ea1b250828.tar.gz samba-04396c36d3ee8300b2b73ea8b43a45ea1b250828.tar.bz2 samba-04396c36d3ee8300b2b73ea8b43a45ea1b250828.zip |
r13333: revert previous commit I will use ldb_caseless_cmp in attrib_handlers
to correctly support utf8 comparisons
add an ldb_attr_Casefold function for attribute names and use it
instead of casefold in the right places
(This used to be commit 3b4eb2413bbce059dde69f35c03cdc3cc2ba85c5)
Diffstat (limited to 'source4/lib/db_wrap.c')
-rw-r--r-- | source4/lib/db_wrap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/db_wrap.c b/source4/lib/db_wrap.c index 4223d19b3f..f3358bff98 100644 --- a/source4/lib/db_wrap.c +++ b/source4/lib/db_wrap.c @@ -55,7 +55,12 @@ static void ldb_wrap_debug(void *context, enum ldb_debug_level level, free(s); } -char *wrap_casefold(void *context, void *mem_ctx, const char *s) +static int wrap_caseless_cmp(void *context, const char *s1, const char *s2) +{ + return strcasecmp_m(s1, s2); +} + +static char *wrap_casefold(void *context, void *mem_ctx, const char *s) { return strupper_talloc(mem_ctx, s); } @@ -128,7 +133,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx, ldb_set_debug(ldb, ldb_wrap_debug, NULL); - ldb_set_utf8_fns(ldb, NULL, wrap_casefold); + ldb_set_utf8_fns(ldb, NULL, wrap_caseless_cmp, wrap_casefold); return ldb; } |