nsswitch: Fix wbcListUsers test
authorChristof Schmitt <cs@samba.org>
Fri, 30 Mar 2018 21:28:46 +0000 (14:28 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 6 Apr 2018 15:58:38 +0000 (17:58 +0200)
commit3c146be404affc894c0c702bbfbfcc4fb9ed902b
treed41d81c765883980548a37af9b8eb0c0cc28c473
parent6f07afad07d9c670a00d9d314a8134efdda5e424
nsswitch: Fix wbcListUsers test

With an AD DC, wbcListUsers returns the users in the DOMAIN SEPARATOR
USERNAME 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