diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-18 10:44:56 +0100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-20 12:30:44 +1100 |
commit | a2707a3248f13a95e1cd7deecdbd2c26226a78b1 (patch) | |
tree | 1c1917e56ec6b7c1744e3c0bd3d8d9e17307b358 /source4/lib/ldb/ldb_tdb/ldb_tdb.c | |
parent | afb70f9176563e2d96886c086ec7d57bf78393b2 (diff) | |
download | samba-a2707a3248f13a95e1cd7deecdbd2c26226a78b1.tar.gz samba-a2707a3248f13a95e1cd7deecdbd2c26226a78b1.tar.bz2 samba-a2707a3248f13a95e1cd7deecdbd2c26226a78b1.zip |
ldb:ldb_tdb backend/indexes - Outside API
- The outside API contains "DN" string arguments: Bad. Since in this way we
fully rely on the outside calls regarding the right DN format. Solution: Use
always a "struct ldb_dn" entry. Since this one is interchangeable and we can
handle it in our preferred way.
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index e8aa5b6a86..7fb3cdc067 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -498,23 +498,17 @@ static int msg_delete_attribute(struct ldb_module *module, struct ldb_context *ldb, struct ldb_message *msg, const char *name) { - const char *dn; unsigned int i; int ret; struct ldb_message_element *el; - dn = ldb_dn_get_linearized(msg->dn); - if (dn == NULL) { - return -1; - } - el = ldb_msg_find_element(msg, name); if (el == NULL) { return -1; } i = el - msg->elements; - ret = ltdb_index_del_element(module, dn, el); + ret = ltdb_index_del_element(module, msg->dn, el); if (ret != LDB_SUCCESS) { return ret; } @@ -562,7 +556,7 @@ static int msg_delete_element(struct ldb_module *module, return msg_delete_attribute(module, ldb, msg, name); } - ret = ltdb_index_del_value(module, ldb_dn_get_linearized(msg->dn), el, i); + ret = ltdb_index_del_value(module, msg->dn, el, i); if (ret != LDB_SUCCESS) { return -1; } |