diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-01 03:49:41 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-01 03:49:41 +0000 |
commit | db6ce132e360a42ea6843c81429be194662fce39 (patch) | |
tree | 5af278aeaf68a5deefe5bcc2d63b7c2cfb22b8fe /source3/lib | |
parent | 8d4a397d858b1eeb349ddc35fc2cc7d50c79f62f (diff) | |
download | samba-db6ce132e360a42ea6843c81429be194662fce39.tar.gz samba-db6ce132e360a42ea6843c81429be194662fce39.tar.bz2 samba-db6ce132e360a42ea6843c81429be194662fce39.zip |
* fix the trustdom_cache to work when winbindd is not running.
smbd will update the trustdom_cache periodically after locking
the timestamp key
(This used to be commit 7bc4b65b91f98271089335cc301146d5f0c76c3a)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/gencache.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 40b4d1390d..58e44e3f0b 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -347,3 +347,24 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time tdb_search_list_free(first_node); } + +/******************************************************************** + lock a key +********************************************************************/ + +int gencache_lock_entry( const char *key ) +{ + return tdb_lock_bystring(cache, key, 0); +} + +/******************************************************************** + unlock a key +********************************************************************/ + +void gencache_unlock_entry( const char *key ) +{ + tdb_unlock_bystring(cache, key); + return; +} + + |