summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-09 23:59:42 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-09 23:59:42 +0000
commit31842f5d017f01922cec306f7bfa2fa0fe748ca2 (patch)
tree3a17ecc634f1079f60fcb81d05d3672d65b84aa0 /source3/nsswitch/winbindd.c
parente3d171ff55c7afec6687616a3808637f2d4cf456 (diff)
downloadsamba-31842f5d017f01922cec306f7bfa2fa0fe748ca2.tar.gz
samba-31842f5d017f01922cec306f7bfa2fa0fe748ca2.tar.bz2
samba-31842f5d017f01922cec306f7bfa2fa0fe748ca2.zip
completely new winbindd cache infrastructure
this one looks like just another winbind backend, and has the following properties: - does -ve and +ve cacheing of all queries - can be disabled with -n switch to winbindd - stores all records packed, so even huge domains are not a problem for a complete cache - handles the server being down - uses sequence numbers for all entries This fixes a lot of problems with winbindd. Serving from cache is now *very* fast. (This used to be commit fddb4f4c04473a60a97212c0c8e143d6a4d68380)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index c1402dc8fb..0db16b6874 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -29,6 +29,7 @@ extern pstring debugf;
struct winbindd_cli_state *client_list;
static int num_clients;
+BOOL opt_nocache;
/* Reload configuration */
@@ -132,7 +133,6 @@ static void print_winbindd_status(void)
{
winbindd_status();
winbindd_idmap_status();
- winbindd_cache_status();
winbindd_cm_status();
}
@@ -140,9 +140,8 @@ static void print_winbindd_status(void)
static void flush_caches(void)
{
- /* Clear cached user and group enumation info */
-
- winbindd_flush_cache();
+ /* Clear cached user and group enumation info */
+ wcache_flush_cache();
}
/* Handle the signal by unlinking socket and exiting */
@@ -748,23 +747,25 @@ int main(int argc, char **argv)
/* Initialise samba/rpc client stuff */
- while ((opt = getopt(argc, argv, "id:s:")) != EOF) {
+ while ((opt = getopt(argc, argv, "id:s:n")) != EOF) {
switch (opt) {
- /* Don't become a daemon */
-
+ /* Don't become a daemon */
case 'i':
interactive = True;
break;
- /* Run with specified debug level */
+ /* disable cacheing */
+ case 'n':
+ opt_nocache = True;
+ break;
+ /* Run with specified debug level */
case 'd':
new_debuglevel = atoi(optarg);
break;
/* Load a different smb.conf file */
-
case 's':
pstrcpy(dyn_CONFIGFILE,optarg);
break;
@@ -823,8 +824,6 @@ int main(int argc, char **argv)
if (!winbindd_idmap_init())
return 1;
- winbindd_cache_init();
-
/* Unblock all signals we are interested in as they may have been
blocked by the parent process. */