diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-28 17:09:57 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-28 17:09:57 +0100 |
commit | 3ba59d461665a16cf87b991a8135821208457f67 (patch) | |
tree | 76dde860cac5807db5999c3799485a2476fae2b6 | |
parent | 533d6f617efc4dfe1e145785cb9736df07671bdf (diff) | |
download | samba-3ba59d461665a16cf87b991a8135821208457f67.tar.gz samba-3ba59d461665a16cf87b991a8135821208457f67.tar.bz2 samba-3ba59d461665a16cf87b991a8135821208457f67.zip |
don't store cache_readonly in gencache
tdb won't allow us to write anyway
(This used to be commit 069cd6d63a61065be7926230235e198c456d38ae)
-rw-r--r-- | source3/lib/gencache.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index a50e5d01fa..663385cfe3 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -32,7 +32,6 @@ #define BLOB_TYPE_LEN 9 static TDB_CONTEXT *cache; -static bool cache_readonly; /** * @file gencache.c @@ -67,7 +66,6 @@ bool gencache_init(void) if (!cache && (errno == EACCES)) { cache = tdb_open_log(cache_fname, 0, TDB_DEFAULT, O_RDONLY, 0644); if (cache) { - cache_readonly = True; DEBUG(5, ("gencache_init: Opening cache file %s read-only.\n", cache_fname)); } } @@ -95,7 +93,6 @@ bool gencache_shutdown(void) DEBUG(5, ("Closing cache file\n")); ret = tdb_close(cache); cache = NULL; - cache_readonly = False; return ret != -1; } @@ -123,10 +120,6 @@ bool gencache_set(const char *keystr, const char *value, time_t timeout) if (!gencache_init()) return False; - if (cache_readonly) { - return False; - } - asprintf(&valstr, CACHE_DATA_FMT, (int)timeout, value); if (!valstr) return False; @@ -161,10 +154,6 @@ bool gencache_del(const char *keystr) if (!gencache_init()) return False; - if (cache_readonly) { - return False; - } - DEBUG(10, ("Deleting cache entry (key = %s)\n", keystr)); ret = tdb_delete_bystring(cache, keystr); @@ -351,10 +340,6 @@ bool gencache_set_data_blob(const char *keystr, DATA_BLOB *blob, time_t timeout) return False; } - if (cache_readonly) { - return False; - } - asprintf(&valstr, "%12u/%s", (int)timeout, BLOB_TYPE); if (!valstr) { return False; |