summaryrefslogtreecommitdiff
path: root/source3/libsmb/trustdom_cache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-10 12:24:56 +0200
committerVolker Lendecke <vl@samba.org>2009-07-15 10:55:20 +0200
commit3edcd55bf140d09833284ba5a0f04f86b04ef7dc (patch)
tree4f608ee12dcd56f02143417bc816d318a16e12e4 /source3/libsmb/trustdom_cache.c
parentd936d1bd84e130aaff1de64cb1ecbd1f936dd9c4 (diff)
downloadsamba-3edcd55bf140d09833284ba5a0f04f86b04ef7dc.tar.gz
samba-3edcd55bf140d09833284ba5a0f04f86b04ef7dc.tar.bz2
samba-3edcd55bf140d09833284ba5a0f04f86b04ef7dc.zip
Remove gencache_init/shutdown
gencache_get/set/del/iterate call gencache_init() internally anyway. And we've been very lazy calling gencache_shutdown, so this seems not really required.
Diffstat (limited to 'source3/libsmb/trustdom_cache.c')
-rw-r--r--source3/libsmb/trustdom_cache.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/source3/libsmb/trustdom_cache.c b/source3/libsmb/trustdom_cache.c
index d891c0768e..eb52b3588d 100644
--- a/source3/libsmb/trustdom_cache.c
+++ b/source3/libsmb/trustdom_cache.c
@@ -48,12 +48,6 @@
bool trustdom_cache_enable(void)
{
- /* Init trustdom cache by calling gencache initialisation */
- if (!gencache_init()) {
- DEBUG(2, ("trustdomcache_enable: Couldn't initialise trustdom cache on top of gencache.\n"));
- return False;
- }
-
return True;
}
@@ -68,12 +62,6 @@ bool trustdom_cache_enable(void)
bool trustdom_cache_shutdown(void)
{
- /* Close trustdom cache by calling gencache shutdown */
- if (!gencache_shutdown()) {
- DEBUG(2, ("trustdomcache_shutdown: Couldn't shutdown trustdom cache on top of gencache.\n"));
- return False;
- }
-
return True;
}
@@ -114,13 +102,6 @@ bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
fstring sid_string;
bool ret;
- /*
- * we use gecache call to avoid annoying debug messages
- * about initialised trustdom
- */
- if (!gencache_init())
- return False;
-
DEBUG(5, ("trustdom_store: storing SID %s of domain %s\n",
sid_string_dbg(sid), name));
@@ -165,10 +146,6 @@ bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
char *key = NULL, *value = NULL;
time_t timeout;
- /* init the cache */
- if (!gencache_init())
- return False;
-
/* exit now if null pointers were passed as they're required further */
if (!sid)
return False;
@@ -209,10 +186,6 @@ uint32 trustdom_cache_fetch_timestamp( void )
time_t timeout;
uint32 timestamp;
- /* init the cache */
- if (!gencache_init())
- return False;
-
if (!gencache_get(TDOMTSKEY, &value, &timeout)) {
DEBUG(5, ("no timestamp for trusted domain cache located.\n"));
SAFE_FREE(value);
@@ -233,10 +206,6 @@ bool trustdom_cache_store_timestamp( uint32 t, time_t timeout )
{
fstring value;
- /* init the cache */
- if (!gencache_init())
- return False;
-
fstr_sprintf(value, "%d", t );
if (!gencache_set(TDOMTSKEY, value, timeout)) {
@@ -267,9 +236,6 @@ static void flush_trustdom_name(const char* key, const char *value, time_t timeo
void trustdom_cache_flush(void)
{
- if (!gencache_init())
- return;
-
/*
* iterate through each TDOM cache's entry and flush it
* by flush_trustdom_name function