s4:dsdb/objectclass: do not pass the callers controls on helper searches
authorStefan Metzmacher <metze@samba.org>
Sat, 24 Nov 2012 22:21:10 +0000 (23:21 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 30 Nov 2012 16:17:21 +0000 (17:17 +0100)
We add AS_SYSTEM and SHOW_RECYCLED to the helper search,
don't let the caller specify additional controls.

This also fixes a problem when the caller also specified AS_SYSTEM.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source4/dsdb/samdb/ldb_modules/objectclass.c

index 590927a7aa6244ba4177c57e0f8ee34e4ae07967..de154ec0180fb9fd96d6e8c2feb7aa1530b570f4 100644 (file)
@@ -1264,7 +1264,7 @@ static int objectclass_delete(struct ldb_module *module, struct ldb_request *req
        ret = ldb_build_search_req(&search_req, ldb,
                                   ac, req->op.del.dn, LDB_SCOPE_BASE,
                                   "(objectClass=*)",
-                                  attrs, req->controls,
+                                  attrs, NULL,
                                   ac, get_search_callback,
                                   req);
        LDB_REQ_SET_LOCATION(search_req);