summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-18 11:21:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:15 -0500
commit2a187c94f05ab6e1c1dd8db4d04b422d8bb132b4 (patch)
tree7e80fc0077a3fd2b1880ecff1e93285ced932ca0
parentf81d80a4afd77cd100832b80bc2383d7c19a71a8 (diff)
downloadsamba-2a187c94f05ab6e1c1dd8db4d04b422d8bb132b4.tar.gz
samba-2a187c94f05ab6e1c1dd8db4d04b422d8bb132b4.tar.bz2
samba-2a187c94f05ab6e1c1dd8db4d04b422d8bb132b4.zip
r12995: Don't allow overrides on "name" from above, as it can't be correct.
Andrew Bartlett (This used to be commit 4a50bf95b93310f640a4ba28990f054e85215551)
-rw-r--r--source4/lib/ldb/modules/rdn_name.c10
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;