summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap
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/ldb_ldap
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/ldb_ldap')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 85604dfe76..d9640f247a 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -496,6 +496,35 @@ static int lldb_modify(struct ldb_module *module, const struct ldb_message *msg)
return ret;
}
+static int lldb_lock(struct ldb_module *module, const char *lockname)
+{
+ struct ldb_context *ldb = module->ldb;
+ struct lldb_private *lldb = module->private_data;
+ int ret = 0;
+
+ if (lockname == NULL) {
+ return -1;
+ }
+
+ /* TODO implement a local locking mechanism here */
+
+ return ret;
+}
+
+static int lldb_unlock(struct ldb_module *module, const char *lockname)
+{
+ struct ldb_context *ldb = module->ldb;
+ struct lldb_private *lldb = module->private_data;
+ int ret = 0;
+
+ if (lockname == NULL) {
+ return -1;
+ }
+
+ /* TODO implement a local unlocking mechanism here */
+
+ return ret;
+}
/*
return extended error information
@@ -516,6 +545,8 @@ static const struct ldb_module_ops lldb_ops = {
lldb_modify,
lldb_delete,
lldb_rename,
+ lldb_lock,
+ lldb_unlock,
lldb_errstring
};