git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
430491b
)
s4:rdn_name LDB module - use "ldb_msg_remove_attr" for deleting attributes
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Thu, 3 Jun 2010 16:25:43 +0000
(18:25 +0200)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sun, 6 Jun 2010 18:48:04 +0000
(20:48 +0200)
source4/lib/ldb/modules/rdn_name.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/modules/rdn_name.c
b/source4/lib/ldb/modules/rdn_name.c
index ee5ab9a4fdfab3999bdce3a995091a913c50b65c..38a1b6f583d29d13617e04aec5113628991a8e98 100644
(file)
--- a/
source4/lib/ldb/modules/rdn_name.c
+++ b/
source4/lib/ldb/modules/rdn_name.c
@@
-116,10
+116,8
@@
static int rdn_name_add(struct ldb_module *module, struct ldb_request *req)
rdn_val = ldb_val_dup(msg, ldb_dn_get_rdn_val(msg->dn));
- /* Perhaps someone above us tried to set this? */
- if ((attribute = ldb_msg_find_element(msg, "name")) != NULL ) {
- attribute->num_values = 0;
- }
+ /* Perhaps someone above us tried to set this? Then ignore it */
+ ldb_msg_remove_attr(msg, "name");
ret = ldb_msg_add_value(msg, "name", &rdn_val, NULL);
if (ret != LDB_SUCCESS) {