From 278a3c7f7c6506134e0e1d15126f55b444f37fbc Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 9 May 2024 16:52:53 +1200 Subject: [PATCH] ldb: add a utf-8 comparison fold callback This isn't used yet, but it will allow library users to select a case-insensitive comparison function that matches their chosen casefold. This will allow the comparisons to be consistent when the strings are bad, whereas currently we kind of guess. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- lib/ldb/include/ldb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h index b6625d9d96e..a3436359559 100644 --- a/lib/ldb/include/ldb.h +++ b/lib/ldb/include/ldb.h @@ -241,6 +241,7 @@ struct ldb_debug_ops { struct ldb_utf8_fns { void *context; char *(*casefold)(void *context, TALLOC_CTX *mem_ctx, const char *s, size_t n); + int (*casecmp)(void *context, const struct ldb_val *v1, const struct ldb_val *v2); }; /**