diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/modules/rdn_name.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |