summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-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);