s4:dsdb_schema_set_attributes - remove unneeded filter criterias
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 3 Jul 2010 12:05:04 +0000 (14:05 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 3 Jul 2010 12:53:02 +0000 (14:53 +0200)
We already choose the right entry by specifying the right basedn with scope
"LDB_SCOPE_BASE".

source4/dsdb/schema/schema_set.c

index cb43111b3aa1431a1933070a1ee2d22f8b9f2b13..e913ecf2cd3ab6d6a8bc8a910995b41e9ef5fab5 100644 (file)
@@ -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) {