diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-03 18:25:43 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-06 20:48:04 +0200 |
commit | dd64b253fcd9013788093f6b98ebd14ef2308619 (patch) | |
tree | ae60a69f210d07d5f3a430afac2a8045e114e992 /source4/lib/ldb/modules | |
parent | 430491b2df9e3512a98a88aa279f04a91c12be92 (diff) | |
download | samba-dd64b253fcd9013788093f6b98ebd14ef2308619.tar.gz samba-dd64b253fcd9013788093f6b98ebd14ef2308619.tar.bz2 samba-dd64b253fcd9013788093f6b98ebd14ef2308619.zip |
s4:rdn_name LDB module - use "ldb_msg_remove_attr" for deleting attributes
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r-- | source4/lib/ldb/modules/rdn_name.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c index ee5ab9a4fd..38a1b6f583 100644 --- 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) { |