From 0dad5a34273bf5cadcfd4a36d69bdffbf69eb073 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 1 May 2004 09:45:56 +0000 Subject: r435: a major upgrade for ldb - added the ability to mark record attributes as being CASE_INSENSITIVE, WILDCARD or INTEGER. - added the ability to support objectclass subclasses, and to search by a parent class - added internal support for case insensitive versus case sensitive indexing (not UTF8 compliant yet) - cleaned up a number of const warnings - added a number of helper functions for fetching integers, strings and doubles - added a in-memory cache for important database properties, supported by a database sequence number - changed some variable names to avoid conflicts with C++ (This used to be commit f2bf06f25c2e6c744817711c7bedbd1d3b52f994) --- source4/lib/ldb/ldb_ldap/ldb_ldap.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb/ldb_ldap') diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 55c083b44c..8723beeadc 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -96,6 +96,11 @@ static int lldb_delete(struct ldb_context *ldb, const char *dn) { struct lldb_private *lldb = ldb->private_data; int ret = 0; + + /* ignore ltdb specials */ + if (dn[0] == '@') { + return 0; + } lldb->last_rc = ldap_delete_s(lldb->ldap, dn); if (lldb->last_rc != LDAP_SUCCESS) { @@ -202,7 +207,7 @@ static int lldb_add_msg_attr(struct ldb_message *msg, */ static int lldb_search(struct ldb_context *ldb, const char *base, enum ldb_scope scope, const char *expression, - const char **attrs, struct ldb_message ***res) + char * const *attrs, struct ldb_message ***res) { struct lldb_private *lldb = ldb->private_data; int count, msg_count; @@ -392,6 +397,11 @@ static int lldb_add(struct ldb_context *ldb, const struct ldb_message *msg) LDAPMod **mods; int ret = 0; + /* ignore ltdb specials */ + if (msg->dn[0] == '@') { + return 0; + } + mods = lldb_msg_to_mods(msg, 0); lldb->last_rc = ldap_add_s(lldb->ldap, msg->dn, mods); @@ -414,6 +424,11 @@ static int lldb_modify(struct ldb_context *ldb, const struct ldb_message *msg) LDAPMod **mods; int ret = 0; + /* ignore ltdb specials */ + if (msg->dn[0] == '@') { + return 0; + } + mods = lldb_msg_to_mods(msg, 1); lldb->last_rc = ldap_modify_s(lldb->ldap, msg->dn, mods); -- cgit