summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-19 20:34:08 +0200
committerAndrew Bartlett <abartlet@samba.org>2010-09-24 09:25:43 +1000
commit964f9927798b884ddde1c78902d6d81a1d93c8d0 (patch)
tree5ade9805c09952275304bfca5b4470d363a335ed /source4/dsdb/samdb/ldb_modules
parent30afa657851ba1785f1ecfb8f684c233b9157cc1 (diff)
downloadsamba-964f9927798b884ddde1c78902d6d81a1d93c8d0.tar.gz
samba-964f9927798b884ddde1c78902d6d81a1d93c8d0.tar.bz2
samba-964f9927798b884ddde1c78902d6d81a1d93c8d0.zip
s4:repl_meta_data - also on delete operations the new RDN attribute has to be casefolded correctly
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 6ae8e928b0..1712c03feb 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2713,11 +2713,20 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
}
if (deletion_state == OBJECT_NOT_DELETED) {
+ const struct dsdb_attribute *sa;
+
/* work out what the new rdn value is, for updating the
rDN and name fields */
new_rdn_value = ldb_dn_get_rdn_val(new_dn);
- ret = ldb_msg_add_value(msg, strlower_talloc(tmp_ctx, rdn_name), new_rdn_value, &el);
+ sa = dsdb_attribute_by_lDAPDisplayName(schema, rdn_name);
+ if (!sa) {
+ talloc_free(tmp_ctx);
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
+ ret = ldb_msg_add_value(msg, sa->lDAPDisplayName, new_rdn_value,
+ &el);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;