summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-11-15 03:28:24 +0000
committerTim Potter <tpot@samba.org>2001-11-15 03:28:24 +0000
commit0d252203a7098f1cb674db5e9212845e4557d883 (patch)
treeb331c61c1e819f48aca3179d54a41427de9d3912
parent17ce9c52819ac2597684efa10475f5d0fb8fa206 (diff)
downloadsamba-0d252203a7098f1cb674db5e9212845e4557d883.tar.gz
samba-0d252203a7098f1cb674db5e9212845e4557d883.tar.bz2
samba-0d252203a7098f1cb674db5e9212845e4557d883.zip
Fixed display of uninitialised buffer in debug.
Get list of trusted domains if we haven't fetched them yet. (This used to be commit a7ef2d20b1bb4bdb1b9a2769b5c654bd0be791b3)
-rw-r--r--source3/nsswitch/winbindd_group.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index e1e4443442..335f1d6514 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -168,8 +168,8 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
*gr_mem = buf;
*gr_mem_len = buf_len;
- DEBUG(10, ("fill_grent_mem(): num_mem = %d, len = %d, mem = %s\n", *num_gr_mem,
- buf_len, buf));
+ DEBUG(10, ("fill_grent_mem(): num_mem = %d, len = %d, mem = %s\n",
+ *num_gr_mem, buf_len, num_gr_mem ? buf : "NULL"));
result = True;
@@ -393,6 +393,9 @@ enum winbindd_result winbindd_setgrent(struct winbindd_cli_state *state)
/* Create sam pipes for each domain we know about */
+ if (domain_list == NULL)
+ get_domain_info();
+
for (tmp = domain_list; tmp != NULL; tmp = tmp->next) {
struct getent_state *domain_state;
@@ -757,6 +760,9 @@ enum winbindd_result winbindd_list_groups(struct winbindd_cli_state *state)
ZERO_STRUCT(groups);
+ if (domain_list == NULL)
+ get_domain_info();
+
for (domain = domain_list; domain; domain = domain->next) {
/* Skip domains other than WINBINDD_DOMAIN environment