r26692: registry: Treat key and value names case-insensitively.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 8 Jan 2008 05:41:55 +0000 (23:41 -0600)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Jan 2008 23:48:02 +0000 (17:48 -0600)
source/lib/registry/ldb.c

index 1e345ba9f35ff0170204250847910afdc4da0903..259315cc3955d93f87e776b9b8433084642c0af6 100644 (file)
@@ -345,6 +345,7 @@ WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
 {
        struct ldb_key_data *kd;
        struct ldb_context *wrap;
+       struct ldb_message *attrs_msg;
 
        if (location == NULL)
                return WERR_INVALID_PARAM;
@@ -357,6 +358,15 @@ WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
                return WERR_FOOBAR;
        }
 
+       attrs_msg = ldb_msg_new(wrap);
+       W_ERROR_HAVE_NO_MEMORY(attrs_msg);
+       attrs_msg->dn = ldb_dn_new(attrs_msg, wrap, "@ATTRIBUTES");
+       W_ERROR_HAVE_NO_MEMORY(attrs_msg->dn);
+       ldb_msg_add_string(attrs_msg, "key", "CASE_INSENSITIVE");
+       ldb_msg_add_string(attrs_msg, "value", "CASE_INSENSITIVE");
+
+       ldb_add(wrap, attrs_msg);
+
        ldb_set_debug_stderr(wrap);
 
        kd = talloc_zero(parent_ctx, struct ldb_key_data);