summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-05 04:56:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:44 -0500
commit28456784e9c547f564635fe32df48eccecfc84b6 (patch)
tree9ffb479a2de72afa25385e9a5a7acaaaca53151b /source4/lib/ldb
parent5cea3edcefc8bec3caed077a5712cb06c7f14816 (diff)
downloadsamba-28456784e9c547f564635fe32df48eccecfc84b6.tar.gz
samba-28456784e9c547f564635fe32df48eccecfc84b6.tar.bz2
samba-28456784e9c547f564635fe32df48eccecfc84b6.zip
r12717: Always compile the skel module, so we know when we break it.
Also fix up all the current issues with the skel module. Andrew Bartlett (This used to be commit d0a0a8de3fa73d8f06a801203e00b90ed8359b98)
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/config.mk9
-rw-r--r--source4/lib/ldb/modules/skel.c47
2 files changed, 28 insertions, 28 deletions
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 96cd0dbad8..13280bac68 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -61,6 +61,15 @@ OBJ_FILES = modules/ldb_map.o
################################################
################################################
+# Start MODULE libldb_skel
+[MODULE::libldb_skel]
+SUBSYSTEM = LIBLDB
+OUTPUT_TYPE = MERGEDOBJ
+OBJ_FILES = modules/skel.o
+# End MODULE libldb_skel
+################################################
+
+################################################
# Start MODULE libldb_sqlite3
[MODULE::libldb_sqlite3]
SUBSYSTEM = LIBLDB
diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c
index fcec0f3fd8..1bbb81f288 100644
--- a/source4/lib/ldb/modules/skel.c
+++ b/source4/lib/ldb/modules/skel.c
@@ -42,35 +42,32 @@ struct private_data {
};
/* search */
-static int skel_search(struct ldb_module *module, const struct ldb_dn *base,
- enum ldb_scope scope, struct ldb_parse_tree *tree,
- const char * const *attrs, struct ldb_result **res)
+static int skel_search(struct ldb_module *module, struct ldb_request *req)
{
- return ldb_next_search(module, base, scope, tree, attrs, res);
+ return ldb_next_request(module, req);
}
-/* add_record */
-static int skel_add_record(struct ldb_module *module, const struct ldb_message *msg)
-{
- return ldb_next_add_record(module, msg);
+/* add */
+static int skel_add(struct ldb_module *module, struct ldb_request *req){
+ return ldb_next_request(module, req);
}
-/* modify_record */
-static int skel_modify_record(struct ldb_module *module, const struct ldb_message *msg)
+/* modify */
+static int skel_modify(struct ldb_module *module, struct ldb_request *req)
{
- return ldb_next_modify_record(module, msg);
+ return ldb_next_request(module, req);
}
-/* delete_record */
-static int skel_delete_record(struct ldb_module *module, const struct ldb_dn *dn)
+/* delete */
+static int skel_delete(struct ldb_module *module, struct ldb_request *req)
{
- return ldb_next_delete_record(module, dn);
+ return ldb_next_request(module, req);
}
-/* rename_record */
-static int skel_rename_record(struct ldb_module *module, const struct ldb_dn *olddn, const struct ldb_dn *newdn)
+/* rename */
+static int skel_rename(struct ldb_module *module, struct ldb_request *req)
{
- return ldb_next_rename_record(module, olddn, newdn);
+ return ldb_next_request(module, req);
}
/* start a transaction */
@@ -105,26 +102,20 @@ static int skel_request(struct ldb_module *module, struct ldb_request *req)
switch (req->operation) {
case LDB_REQ_SEARCH:
- return skel_search_bytree(module,
- req->op.search->base,
- req->op.search->scope,
- req->op.search->tree,
- req->op.search->attrs,
- req->op.search->res);
+ return skel_search(module, req);
case LDB_REQ_ADD:
- return skel_add(module, req->op.add->message);
+ return skel_add(module, req);
case LDB_REQ_MODIFY:
- return skel_modify(module, req->op.mod->message);
+ return skel_modify(module, req);
case LDB_REQ_DELETE:
- return skel_delete(module, req->op.del->dn);
+ return skel_delete(module, req);
case LDB_REQ_RENAME:
return skel_rename(module,
- req->op.rename->olddn,
- req->op.rename->newdn);
+ req);
default:
return ldb_next_request(module, req);