summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-04 06:17:39 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-04 06:17:39 +0000
commit8e8ce079b8c54b257111537d487a5419ce0d1479 (patch)
tree9938c5011a2259b69f576acb6e6fe687a9be5945 /source3/nsswitch/winbindd_group.c
parentde98a82052f7f8dbd0785d8d5e26f84e19c32252 (diff)
downloadsamba-8e8ce079b8c54b257111537d487a5419ce0d1479.tar.gz
samba-8e8ce079b8c54b257111537d487a5419ce0d1479.tar.bz2
samba-8e8ce079b8c54b257111537d487a5419ce0d1479.zip
added a query_user backend
fixed a winbindd crash when the group membership can't be looked up (This used to be commit 088f4cc5be4a1a38781e4d019146d53993ed8c6f)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index f71cdb7ece..07f30f0acc 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -614,6 +614,8 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
fstring domain_group_name;
uint32 result;
gid_t group_gid;
+ int gr_mem_len;
+ char *gr_mem, *new_gr_mem_list;
/* Do we need to fetch another chunk of groups? */
@@ -678,20 +680,17 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
/* Fill in group membership entry */
if (result) {
- int gr_mem_len;
- char *gr_mem, *new_gr_mem_list;
-
/* Get group membership */
-
result = fill_grent_mem(
ent->domain,
name_list[ent->sam_entry_index].rid,
SID_NAME_DOM_GRP,
&group_list[group_list_ndx].num_gr_mem,
&gr_mem, &gr_mem_len);
+ }
+ if (result) {
/* Append to group membership list */
-
new_gr_mem_list = Realloc(
gr_mem_list,
gr_mem_list_len + gr_mem_len);