Enumerating from trusted domain - fix to winbindd_util.c
kcross at nssolutions.com
Tue Feb 11 17:44:54 GMT 2003
You may or may not have noticed, but wbinfo -m doesn't work on
SAMBA_3_0, and -u or -g don't return users/groups from trusted domains.
The problem was in winbindd_util.c. init_domain_list would reset the
list using free_domain_list and then call rescan_trusted_domains. But
if it wasn't time to rescan the list (every 5 minutes),
rescan_trusted_domains didn't do anything.
The patch below resets the time from init_domain_list to force
rescan_trusted_domains to actually do it.
An alternate (and preferable) fix would be to add a "force_rescan"
argument to rescan_trusted_domains, but that would have been a slightly
bigger deal to patch.
Network Storage Solutions
RCS file: /cvsroot/samba/source/nsswitch/winbindd_util.c,v
retrieving revision 220.127.116.11
diff -p -u -r18.104.22.168 winbindd_util.c
--- winbindd_util.c 15 Jan 2003 23:32:47 -0000 22.214.171.124
+++ winbindd_util.c 11 Feb 2003 17:35:00 -0000
@@ -146,11 +146,11 @@ static struct winbindd_domain *add_trust
rescan our domains looking for new trusted domains
+static time_t last_scan;
struct winbindd_domain *domain;
- static time_t last_scan;
time_t t = time(NULL);
/* trusted domains might be disabled */
@@ -217,6 +217,7 @@ BOOL init_domain_list(void)
/* do an initial scan for trusted domains */
+ last_scan = 0; /* KJC Force a rescan to occur */
More information about the samba-technical