summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-16 18:54:09 +0000
committerGerald Carter <jerry@samba.org>2004-03-16 18:54:09 +0000
commit8ef645c8a9a85882d04acb4f978ec060b0fb7c06 (patch)
treefadec5fef6732afb92c6225b9a2e6cc59abd0246 /source3
parente2fd98af575a5c240593f21df442eb035f35e892 (diff)
downloadsamba-8ef645c8a9a85882d04acb4f978ec060b0fb7c06.tar.gz
samba-8ef645c8a9a85882d04acb4f978ec060b0fb7c06.tar.bz2
samba-8ef645c8a9a85882d04acb4f978ec060b0fb7c06.zip
BUG 1182: patch from john.klinger@lmco.com (John Klinger) to reanable the -n 'no cache' option for winbindd
(This used to be commit d1848988d9ee9fdd870bcdd32c938b907419558b)
Diffstat (limited to 'source3')
-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 8a0d0f7573..b55ea297b4 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -785,7 +785,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 4805e628dd..3ee8c0877b 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
@@ -964,7 +966,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));