summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-02-05 20:48:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:48 -0500
commit3721bca79dc6ff409085a2fc40cbd060d25191d4 (patch)
treee4c20147b801904d7f00a8e99d5054cb8fb80a75 /source4/lib/ldb/modules
parent096c2dc10362150aed84f2251fa8ff26c3a535bb (diff)
downloadsamba-3721bca79dc6ff409085a2fc40cbd060d25191d4.tar.gz
samba-3721bca79dc6ff409085a2fc40cbd060d25191d4.tar.bz2
samba-3721bca79dc6ff409085a2fc40cbd060d25191d4.zip
r13354: Add tests to check that controls work properly
Fix asq module, add a second_stage_init to register with rootdse Fix asq control ldap parsing routines (this was nasty to find out) (This used to be commit 933a80397d137f7d5b79c82a068d62bb6928ef47)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r--source4/lib/ldb/modules/asq.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 5d4a5a3970..7e6bbdf29e 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.c
@@ -197,9 +197,29 @@ static int asq(struct ldb_module *module, struct ldb_request *req)
}
}
+static int asq_init_2(struct ldb_module *module)
+{
+ struct ldb_request request;
+ int ret;
+
+ request.operation = LDB_REQ_REGISTER;
+ request.op.reg.oid = LDB_CONTROL_ASQ_OID;
+ request.controls = NULL;
+
+ ret = ldb_request(module->ldb, &request);
+ if (ret != LDB_SUCCESS) {
+ ldb_debug(module->ldb, LDB_DEBUG_ERROR, "asq: Unable to register control with rootdse!\n");
+ return LDB_ERR_OTHER;
+ }
+
+ return ldb_next_second_stage_init(module);
+}
+
+
static const struct ldb_module_ops asq_ops = {
.name = "asq",
- .request = asq
+ .request = asq,
+ .second_stage_init = asq_init_2
};
struct ldb_module *asq_module_init(struct ldb_context *ldb, const char *options[])