diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-17 23:45:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-17 23:45:21 +0000 |
commit | 8b46126a076075aeed31dae1c80eca1ed9f5a251 (patch) | |
tree | f562440e4e262cf8c91b4892c7a4375394dd27a2 /source3/lib/server_mutex.c | |
parent | fe92e9caedbb68756f9d4fcb8ee20c2573e9c4ae (diff) | |
download | samba-8b46126a076075aeed31dae1c80eca1ed9f5a251.tar.gz samba-8b46126a076075aeed31dae1c80eca1ed9f5a251.tar.bz2 samba-8b46126a076075aeed31dae1c80eca1ed9f5a251.zip |
Never, *ever* hold a mutex lock in the message database where there may
be traversals being attempted. Yes, this was from bitter experience (and
an out of control server :-). Also allow callers to break out of a tdb_chainlock
with sigalarm if desired.
Jeremy.
(This used to be commit a7781f91d8c1177210bffc199cd2f3b7ff993eaf)
Diffstat (limited to 'source3/lib/server_mutex.c')
-rw-r--r-- | source3/lib/server_mutex.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c index 416d77564d..3e5512c734 100644 --- a/source3/lib/server_mutex.c +++ b/source3/lib/server_mutex.c @@ -38,7 +38,7 @@ BOOL grab_server_mutex(const char *name) DEBUG(0,("grab_server_mutex: malloc failed for %s\n", name)); return False; } - if (!message_named_mutex(mutex_server_name, 20)) { + if (!secrets_named_mutex(mutex_server_name, 10)) { DEBUG(10,("grab_server_mutex: failed for %s\n", name)); SAFE_FREE(mutex_server_name); return False; @@ -50,8 +50,7 @@ BOOL grab_server_mutex(const char *name) void release_server_mutex(void) { if (mutex_server_name) { - message_named_mutex_release(mutex_server_name); + secrets_named_mutex_release(mutex_server_name); SAFE_FREE(mutex_server_name); } } - |