summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/dsgetdcname.c12
-rw-r--r--source3/libsmb/libsmb_context.c1
-rw-r--r--source3/libsmb/namecache.c34
-rw-r--r--source3/libsmb/namequery.c12
-rw-r--r--source3/libsmb/trustdom_cache.c34
5 files changed, 0 insertions, 93 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 8dee6926d2..9552ad1f22 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -133,10 +133,6 @@ static NTSTATUS dsgetdcname_cache_delete(TALLOC_CTX *mem_ctx,
{
char *key;
- if (!gencache_init()) {
- return NT_STATUS_INTERNAL_DB_ERROR;
- }
-
key = dsgetdcname_cache_key(mem_ctx, domain_name);
if (!key) {
return NT_STATUS_NO_MEMORY;
@@ -160,10 +156,6 @@ static NTSTATUS dsgetdcname_cache_store(TALLOC_CTX *mem_ctx,
char *key;
bool ret = false;
- if (!gencache_init()) {
- return NT_STATUS_INTERNAL_DB_ERROR;
- }
-
key = dsgetdcname_cache_key(mem_ctx, domain_name);
if (!key) {
return NT_STATUS_NO_MEMORY;
@@ -357,10 +349,6 @@ static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx,
struct NETLOGON_SAM_LOGON_RESPONSE_EX r;
NTSTATUS status;
- if (!gencache_init()) {
- return NT_STATUS_INTERNAL_DB_ERROR;
- }
-
key = dsgetdcname_cache_key(mem_ctx, domain_name);
if (!key) {
return NT_STATUS_NO_MEMORY;
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 98885876b3..8b22ee5023 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -123,7 +123,6 @@ SMBC_module_init(void * punused)
static void
SMBC_module_terminate(void)
{
- gencache_shutdown();
secrets_shutdown();
gfree_all();
SMBC_initialized = false;
diff --git a/source3/libsmb/namecache.c b/source3/libsmb/namecache.c
index d3230cffef..dcfc609dcd 100644
--- a/source3/libsmb/namecache.c
+++ b/source3/libsmb/namecache.c
@@ -45,14 +45,6 @@ bool namecache_enable(void)
return False;
}
- /* Init namecache by calling gencache initialisation */
-
- if (!gencache_init()) {
- DEBUG(2, ("namecache_enable: "
- "Couldn't initialise namecache on top of gencache.\n"));
- return False;
- }
-
/* I leave it for now, though I don't think we really
* need this (mimir, 27.09.2002) */
DEBUG(5, ("namecache_enable: enabling netbios namecache, timeout %d "
@@ -102,14 +94,6 @@ bool namecache_store(const char *name,
int i;
bool ret;
- /*
- * we use gecache call to avoid annoying debug messages about
- * initialised namecache again and again...
- */
- if (!gencache_init()) {
- return False;
- }
-
if (name_type > 255) {
return False; /* Don't store non-real name types. */
}
@@ -186,10 +170,6 @@ bool namecache_fetch(const char *name,
return False;
}
- if (!gencache_init()) {
- return False;
- }
-
if (name_type > 255) {
return False; /* Don't fetch non-real name types. */
}
@@ -233,9 +213,6 @@ bool namecache_delete(const char *name, int name_type)
bool ret;
char *key;
- if (!gencache_init())
- return False;
-
if (name_type > 255) {
return False; /* Don't fetch non-real name types. */
}
@@ -274,10 +251,6 @@ static void flush_netbios_name(const char *key,
void namecache_flush(void)
{
- if (!gencache_init()) {
- return;
- }
-
/*
* iterate through each NBT cache's entry and flush it
* by flush_netbios_name function
@@ -312,10 +285,6 @@ bool namecache_status_store(const char *keyname, int keyname_type,
time_t expiry;
bool ret;
- if (!gencache_init()) {
- return False;
- }
-
key = namecache_status_record_key(keyname, keyname_type,
name_type, keyip);
if (!key)
@@ -348,9 +317,6 @@ bool namecache_status_fetch(const char *keyname,
char *value = NULL;
time_t timeout;
- if (!gencache_init())
- return False;
-
key = namecache_status_record_key(keyname, keyname_type,
name_type, keyip);
if (!key)
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 50fb9f1620..05143270b9 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -76,9 +76,6 @@ bool saf_store( const char *domain, const char *servername )
return False;
}
- if ( !gencache_init() )
- return False;
-
key = saf_key( domain );
expire = time( NULL ) + lp_parm_int(-1, "saf","ttl", SAF_TTL);
@@ -108,9 +105,6 @@ bool saf_join_store( const char *domain, const char *servername )
return False;
}
- if ( !gencache_init() )
- return False;
-
key = saf_join_key( domain );
expire = time( NULL ) + lp_parm_int(-1, "saf","join ttl", SAFJOIN_TTL);
@@ -134,9 +128,6 @@ bool saf_delete( const char *domain )
return False;
}
- if ( !gencache_init() )
- return False;
-
key = saf_join_key(domain);
ret = gencache_del(key);
SAFE_FREE(key);
@@ -171,9 +162,6 @@ char *saf_fetch( const char *domain )
return NULL;
}
- if ( !gencache_init() )
- return False;
-
key = saf_join_key( domain );
ret = gencache_get( key, &server, &timeout );
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