summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/modules
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2004-11-21 15:51:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:02 -0500
commita4de8cd6a5a882a8d49fdb4b0e625ffdc6b401bb (patch)
tree734f3b138f68ca776eedd437386ef4e7320a15b8 /source4/lib/ldb/modules
parent7e3503e2770a0473cb4f7d8d45b27cbee766d9fa (diff)
downloadsamba-a4de8cd6a5a882a8d49fdb4b0e625ffdc6b401bb.tar.gz
samba-a4de8cd6a5a882a8d49fdb4b0e625ffdc6b401bb.tar.bz2
samba-a4de8cd6a5a882a8d49fdb4b0e625ffdc6b401bb.zip
r3897: add a locking infrastructure
(This used to be commit a99c0adb09e2bc77b876d23cb2d0711ccffd83ca)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r--source4/lib/ldb/modules/skel.c14
-rw-r--r--source4/lib/ldb/modules/timestamps.c14
2 files changed, 28 insertions, 0 deletions
diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c
index 331a2de5e4..3581969c18 100644
--- a/source4/lib/ldb/modules/skel.c
+++ b/source4/lib/ldb/modules/skel.c
@@ -80,6 +80,18 @@ static int skel_rename_record(struct ldb_module *module, const char *olddn, cons
return ldb_next_rename_record(module, olddn, newdn);
}
+/* named_lock */
+static const char *skel_named_lock(struct ldb_module *module, const char *lockname)
+{
+ return ldb_next_named_lock(module, lockname);
+}
+
+/* named_unlock */
+static const char *skel_named_unlock(struct ldb_module *module, const char *lockname)
+{
+ return ldb_next_named_unlock(module, lockname);
+}
+
/* return extended error information */
static const char *skel_errstring(struct ldb_module *module)
{
@@ -100,6 +112,8 @@ static const struct ldb_module_ops skel_ops = {
skel_modify_record,
skel_delete_record,
skel_rename_record,
+ skel_named_lock,
+ skel_named_unlock,
skel_errstring,
skel_cache_free
};
diff --git a/source4/lib/ldb/modules/timestamps.c b/source4/lib/ldb/modules/timestamps.c
index 521c59d241..fde87ef4a6 100644
--- a/source4/lib/ldb/modules/timestamps.c
+++ b/source4/lib/ldb/modules/timestamps.c
@@ -230,6 +230,18 @@ static int timestamps_rename_record(struct ldb_module *module, const char *olddn
return ldb_next_rename_record(module, olddn, newdn);
}
+static int timestamps_lock(struct ldb_module *module, const char *lockname)
+{
+ ldb_debug(module->ldb, LDB_DEBUG_TRACE, "timestamps_lock\n");
+ return ldb_next_named_lock(module, lockname);
+}
+
+static int timestamps_unlock(struct ldb_module *module, const char *lockname)
+{
+ ldb_debug(module->ldb, LDB_DEBUG_TRACE, "timestamps_unlock\n");
+ return ldb_next_named_unlock(module, lockname);
+}
+
/* return extended error information */
static const char *timestamps_errstring(struct ldb_module *module)
{
@@ -252,6 +264,8 @@ static const struct ldb_module_ops timestamps_ops = {
timestamps_modify_record,
timestamps_delete_record,
timestamps_rename_record,
+ timestamps_lock,
+ timestamps_unlock,
timestamps_errstring,
timestamps_cache_free
};