From d1ee7ab16ee2993e12dad2a3eed2f1719fae11d7 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 3 Jul 2010 14:05:04 +0200 Subject: s4:dsdb_schema_set_attributes - remove unneeded filter criterias We already choose the right entry by specifying the right basedn with scope "LDB_SCOPE_BASE". --- source4/dsdb/schema/schema_set.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index cb43111b3a..e913ecf2cd 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -125,7 +125,8 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem } /* Try to avoid churning the attributes too much - we only want to do this if they have changed */ - ret = ldb_search(ldb, mem_ctx, &res, msg->dn, LDB_SCOPE_BASE, NULL, "dn=%s", ldb_dn_get_linearized(msg->dn)); + ret = ldb_search(ldb, mem_ctx, &res, msg->dn, LDB_SCOPE_BASE, NULL, + NULL); if (ret == LDB_ERR_NO_SUCH_OBJECT) { ret = ldb_add(ldb, msg); } else if (ret != LDB_SUCCESS) { @@ -154,7 +155,8 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem /* Now write out the indexs, as found in the schema (if they have changed) */ - ret = ldb_search(ldb, mem_ctx, &res_idx, msg_idx->dn, LDB_SCOPE_BASE, NULL, "dn=%s", ldb_dn_get_linearized(msg_idx->dn)); + ret = ldb_search(ldb, mem_ctx, &res_idx, msg_idx->dn, LDB_SCOPE_BASE, + NULL, NULL); if (ret == LDB_ERR_NO_SUCH_OBJECT) { ret = ldb_add(ldb, msg_idx); } else if (ret != LDB_SUCCESS) { -- cgit