summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-16 20:32:14 +0000
committerGerald Carter <jerry@samba.org>2004-03-16 20:32:14 +0000
commit2f8a18c093938f7aa31541f9b56da9be23fb861b (patch)
tree117593c55f8e8edca9f37e905cbc1c641ce39176 /source3/nsswitch
parent4b27ffd821b8b46d837afda1c7602359314263d5 (diff)
downloadsamba-2f8a18c093938f7aa31541f9b56da9be23fb861b.tar.gz
samba-2f8a18c093938f7aa31541f9b56da9be23fb861b.tar.bz2
samba-2f8a18c093938f7aa31541f9b56da9be23fb861b.zip
merges from 3.0
(This used to be commit fed98658a5cc82e9fdc65aa73f74e118c1104178)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd.c2
-rw-r--r--source3/nsswitch/winbindd_group.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index c4319d493a..283b2e4a89 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -786,7 +786,7 @@ int main(int argc, char **argv)
{ "foreground", 'F', POPT_ARG_VAL, &Fork, False, "Daemon in foreground mode" },
{ "interactive", 'i', POPT_ARG_NONE, NULL, 'i', "Interactive mode" },
{ "single-daemon", 'Y', POPT_ARG_VAL, &opt_dual_daemon, False, "Single daemon mode" },
- { "no-caching", 'n', POPT_ARG_VAL, &opt_nocache, False, "Disable caching" },
+ { "no-caching", 'n', POPT_ARG_VAL, &opt_nocache, True, "Disable caching" },
POPT_COMMON_SAMBA
POPT_TABLEEND
};
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 74ede8621b..3bdf83cfdf 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -25,6 +25,8 @@
#include "includes.h"
#include "winbindd.h"
+extern BOOL opt_nocache;
+
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -1028,7 +1030,7 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state)
/* Treat the info3 cache as authoritative as the
lookup_usergroups() function may return cached data. */
- if ((info3 = netsamlogon_cache_get(mem_ctx, &user_sid))) {
+ if ( !opt_nocache && (info3 = netsamlogon_cache_get(mem_ctx, &user_sid))) {
DEBUG(10, ("winbindd_getgroups: info3 has %d groups, %d other sids\n",
info3->num_groups2, info3->num_other_sids));