nsswitch: Fix wbcListGroups test
commit80560167956cde78652d804cdf26385f759ba39b
authorChristof Schmitt <cs@samba.org>
Fri, 30 Mar 2018 21:35:03 +0000 (30 14:35 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 11 Apr 2018 09:52:25 +0000 (11 11:52 +0200)
treeebf7711bddadd22634913d33d55384133c689397
parentf901e8cc594526e50a18cf58edef48ca5b74bb29
nsswitch: Fix wbcListGroups test

With an AD DC, wbcListGroups returns the users in the DOMAIN SEPARATOR
GROUPNAME format.  The test then calls wbcLookupName with the domain
name and the previous string (including domain and separator) as
username. Fix this by passing the correct username and adding some
additional checks.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13312

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit f4db4e86c341a89357082e81e30c302440647530)
nsswitch/libwbclient/tests/wbclient.c