nsswitch: Fix wbcListGroups test
authorChristof Schmitt <cs@samba.org>
Fri, 30 Mar 2018 21:35:03 +0000 (14:35 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 6 Apr 2018 15:58:38 +0000 (17:58 +0200)
commitf4db4e86c341a89357082e81e30c302440647530
tree2132c9de7b13cdac3cba95893cda0fc0c2c6890e
parent3c146be404affc894c0c702bbfbfcc4fb9ed902b
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>
nsswitch/libwbclient/tests/wbclient.c