summaryrefslogtreecommitdiff
path: root/source3/passdb/secrets.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-03-10 21:08:29 +0100
committerVolker Lendecke <vl@samba.org>2008-03-10 21:08:45 +0100
commit1ebfc66b2c145289d1e1314e8415d9e3c6f405ae (patch)
tree30b3ca059640ecc963a8744c2a69ef4151dbac7b /source3/passdb/secrets.c
parentd634ab06b34990b6eecee751435f2436ff76ec44 (diff)
downloadsamba-1ebfc66b2c145289d1e1314e8415d9e3c6f405ae.tar.gz
samba-1ebfc66b2c145289d1e1314e8415d9e3c6f405ae.tar.bz2
samba-1ebfc66b2c145289d1e1314e8415d9e3c6f405ae.zip
Use a separate tdb for mutexes
Another preparation to convert secrets.c to dbwrap: The dbwrap API does not provide a sane tdb_lock_with_timeout abstraction. In the clustered case the DC mutex is needed per-node anyway, so it is perfectly fine to use a local mutex only. (This used to be commit f94a63cd8f94490780ad9331da229c0bcb2ca5d6)
Diffstat (limited to 'source3/passdb/secrets.c')
-rw-r--r--source3/passdb/secrets.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 2c0d648716..8448f795b4 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -1029,37 +1029,6 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
}
/*******************************************************************************
- Lock the secrets tdb based on a string - this is used as a primitive form of mutex
- between smbd instances.
-*******************************************************************************/
-
-bool secrets_named_mutex(const char *name, unsigned int timeout)
-{
- int ret = 0;
-
- if (!secrets_init()) {
- return false;
- }
-
- ret = tdb_lock_bystring_with_timeout(tdb, name, timeout);
- if (ret == 0) {
- DEBUG(10,("secrets_named_mutex: got mutex for %s\n", name ));
- }
-
- return (ret == 0);
-}
-
-/*******************************************************************************
- Unlock a named mutex.
-*******************************************************************************/
-
-void secrets_named_mutex_release(const char *name)
-{
- tdb_unlock_bystring(tdb, name);
- DEBUG(10,("secrets_named_mutex: released mutex for %s\n", name ));
-}
-
-/*******************************************************************************
Store a complete AFS keyfile into secrets.tdb.
*******************************************************************************/