summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-01-09 03:11:33 +0000
committerTim Potter <tpot@samba.org>2002-01-09 03:11:33 +0000
commit2ff0b75dc4cd08ee42d418fe5d030fb880804cb4 (patch)
treeaabd7ac86e0832ed276bdc3f5e86086ebd38ff68
parent6bdea23cc5a4ad7301c5ba80ae870bd7c4fc2761 (diff)
downloadsamba-2ff0b75dc4cd08ee42d418fe5d030fb880804cb4.tar.gz
samba-2ff0b75dc4cd08ee42d418fe5d030fb880804cb4.tar.xz
samba-2ff0b75dc4cd08ee42d418fe5d030fb880804cb4.zip
Merge tridge's "fixed a winbindd crash when the group membership can't be
looked up" from 1.32.
-rw-r--r--source/nsswitch/winbindd_group.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c
index 5c66cadddc2..4ddff163079 100644
--- a/source/nsswitch/winbindd_group.c
+++ b/source/nsswitch/winbindd_group.c
@@ -611,6 +611,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? */
@@ -675,8 +677,6 @@ 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 */
@@ -686,7 +686,9 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
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(