From 2a187c94f05ab6e1c1dd8db4d04b422d8bb132b4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 18 Jan 2006 11:21:52 +0000 Subject: r12995: Don't allow overrides on "name" from above, as it can't be correct. Andrew Bartlett (This used to be commit 4a50bf95b93310f640a4ba28990f054e85215551) --- source4/lib/ldb/modules/rdn_name.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c index 1ac404bea6..2e4e250755 100644 --- a/source4/lib/ldb/modules/rdn_name.c +++ b/source4/lib/ldb/modules/rdn_name.c @@ -63,11 +63,6 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req) return ldb_next_request(module, req); } - /* Perhaps someone above us knows better */ - if ((attribute = rdn_name_find_attribute(msg, "name")) != NULL ) { - return ldb_next_request(module, req); - } - msg2 = talloc(module, struct ldb_message); if (!msg2) { return -1; @@ -87,6 +82,11 @@ static int rdn_name_add(struct ldb_module *module, struct ldb_request *req) return -1; } + /* Perhaps someone above us tried to set this? */ + if ((attribute = rdn_name_find_attribute(msg, "name")) != NULL ) { + attribute->num_values = 0; + } + if (ldb_msg_add_value(msg2, "name", &rdn->value) != 0) { talloc_free(msg2); return -1; -- cgit