diff options
author | Günther Deschner <gd@samba.org> | 2007-02-05 15:04:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:43 -0500 |
commit | a9ac4630b46242f88bd7a4e92511b55cc82e9940 (patch) | |
tree | ae017d28c3e70b89ac638f2fa9ebe75e374919e9 /source | |
parent | cdef1d00b89abd632281d428f1e1a6b322559af4 (diff) | |
download | samba-a9ac4630b46242f88bd7a4e92511b55cc82e9940.tar.gz samba-a9ac4630b46242f88bd7a4e92511b55cc82e9940.tar.xz samba-a9ac4630b46242f88bd7a4e92511b55cc82e9940.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
Diffstat (limited to 'source')
-rw-r--r-- | source/nsswitch/winbindd_group.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index 51d595b9476..4215aef5dd7 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -221,6 +221,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 @@ -340,11 +341,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")); |