summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap/ldb_ldap.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-01 09:45:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:51:38 -0500
commit0dad5a34273bf5cadcfd4a36d69bdffbf69eb073 (patch)
tree78ddbe4e053287a0e7a0300e945627ce4b24bc29 /source4/lib/ldb/ldb_ldap/ldb_ldap.c
parenta2b6d47390a07f0d2a737d17144f825a9733d5bf (diff)
downloadsamba-0dad5a34273bf5cadcfd4a36d69bdffbf69eb073.tar.gz
samba-0dad5a34273bf5cadcfd4a36d69bdffbf69eb073.tar.bz2
samba-0dad5a34273bf5cadcfd4a36d69bdffbf69eb073.zip
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)
Diffstat (limited to 'source4/lib/ldb/ldb_ldap/ldb_ldap.c')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c17
1 files changed, 16 insertions, 1 deletions
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);