summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-02-05 15:04:09 +0000
committerGünther Deschner <gd@samba.org>2007-02-05 15:04:09 +0000
commit66b92aba334e89e5e0e886e514d3f556d60bc07c (patch)
treebeb9ca2d5e9060c67e85d80071d38ebadf661d8c
parent2a7194092fd0aeaba5de20aafe57178324d20298 (diff)
downloadsamba-66b92aba334e89e5e0e886e514d3f556d60bc07c.tar.gz
samba-66b92aba334e89e5e0e886e514d3f556d60bc07c.tar.xz
samba-66b92aba334e89e5e0e886e514d3f556d60bc07c.zip
r21149: Only say we are a groupmember for the optimized (rid 513) membership
lookup when we actually are. Although the Linux nss winbind backend protects against num_mem != 0 && buf == NULL. Guenther
-rw-r--r--source/nsswitch/winbindd_group.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c
index 7fd7bb1676f..46cb7744d94 100644
--- a/source/nsswitch/winbindd_group.c
+++ b/source/nsswitch/winbindd_group.c
@@ -80,6 +80,7 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
DEBUG(10, ("group SID %s\n", sid_to_string(sid_string, group_sid)));
+ /* Initialize with no members */
*num_gr_mem = 0;
/* HACK ALERT!! This whole routine does not cope with group members
@@ -201,11 +202,13 @@ static BOOL fill_grent_mem(struct winbindd_domain *domain,
DEBUG(10,("fill_grent_mem: user %s in 'Domain Users' in domain %s\n",
name, domain->name ));
+
+ /* user is the only member */
+ *num_gr_mem = 1;
}
*gr_mem = buf;
*gr_mem_len = buf_len;
- *num_gr_mem = 1;
DEBUG(10, ("num_mem = %u, len = %u, mem = %s\n", (unsigned int)*num_gr_mem,
(unsigned int)buf_len, *num_gr_mem ? buf : "NULL"));