From cc48010f41684b5ef8c2e8a5511528cc426d300f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 20 Dec 2007 10:55:45 +0100 Subject: Add a global cache It hurts, but I think this global variable is necessary for transition, and it has the potential to remove quite a few other global variables without messing with APIs too much. (This used to be commit c131d0dc52ec09c9227eff3d68877369c37aaed5) --- source3/include/memcache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include') diff --git a/source3/include/memcache.h b/source3/include/memcache.h index f849f8ad3b..0ba3bdbb00 100644 --- a/source3/include/memcache.h +++ b/source3/include/memcache.h @@ -37,6 +37,8 @@ enum memcache_number { struct memcache *memcache_init(TALLOC_CTX *mem_ctx, size_t max_size); +void memcache_set_global(struct memcache *cache); + void memcache_add(struct memcache *cache, enum memcache_number n, DATA_BLOB key, DATA_BLOB value); -- cgit From d3d870cc07447cf08a776c714a39f40f9c72da2c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 20 Dec 2007 14:41:58 +0100 Subject: Add memcache_add_talloc The first memcache API only had blobs, but we have quite a few objects that are more complex talloc'ed structues. The current one I'm looking at is the getpwnam cache, but there are others around. (This used to be commit ea0e5ad9a15c848904dee8cb2d3e392b6a894705) --- source3/include/memcache.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/memcache.h b/source3/include/memcache.h index 0ba3bdbb00..36cde98bd3 100644 --- a/source3/include/memcache.h +++ b/source3/include/memcache.h @@ -31,7 +31,7 @@ enum memcache_number { GID_SID_CACHE, SID_GID_CACHE, GETWD_CACHE, - GETPWNAM_CACHE, + GETPWNAM_CACHE, /* talloc */ MANGLE_HASH2_CACHE }; @@ -42,12 +42,18 @@ void memcache_set_global(struct memcache *cache); void memcache_add(struct memcache *cache, enum memcache_number n, DATA_BLOB key, DATA_BLOB value); +void memcache_add_talloc(struct memcache *cache, enum memcache_number n, + DATA_BLOB key, void *ptr); + void memcache_delete(struct memcache *cache, enum memcache_number n, DATA_BLOB key); bool memcache_lookup(struct memcache *cache, enum memcache_number n, DATA_BLOB key, DATA_BLOB *value); +void *memcache_lookup_talloc(struct memcache *cache, enum memcache_number n, + DATA_BLOB key); + void memcache_flush(struct memcache *cache, enum memcache_number n); #endif -- cgit From 89f7883fe9b62248e8cc9e508ddef3a26330f71c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 20 Dec 2007 16:05:57 +0100 Subject: Add a singleton cache First user is yp_default_domain (This used to be commit c19363eb77fcc3e1bf3341e6373d38f1e91fc08f) --- source3/include/memcache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/memcache.h b/source3/include/memcache.h index 36cde98bd3..c4a2974b62 100644 --- a/source3/include/memcache.h +++ b/source3/include/memcache.h @@ -32,7 +32,8 @@ enum memcache_number { SID_GID_CACHE, GETWD_CACHE, GETPWNAM_CACHE, /* talloc */ - MANGLE_HASH2_CACHE + MANGLE_HASH2_CACHE, + SINGLETON_CACHE }; struct memcache *memcache_init(TALLOC_CTX *mem_ctx, size_t max_size); -- cgit From 59ce7650f24eb7c35b8d3ee9f830711a4af8f8e9 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Fri, 21 Dec 2007 11:59:56 -0600 Subject: De-couple smbd from staticly linking against winbindd client files. Implements a wrapper layer in winbind_util.c which are just stubs if compiled --without-winbind. When building with winbindd, it is now required to build the libwbclient DSO first (in the Makefile) and then either set LD_LIBRARY_PATH or /etc/ld.so.conf to pick up the library PATH. (This used to be commit 42787bccff4fcffafc7aae6a678e792604ecaaa5) --- source3/include/includes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index fdeff346e5..14ef2258e6 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -784,6 +784,7 @@ enum flush_reason_enum { NUM_FLUSH_REASONS}; #include "nss_info.h" +#include "nsswitch/libwbclient/wbclient.h" /* generated rpc server implementation functions */ #include "librpc/gen_ndr/srv_echo.h" -- cgit