nsswitch: Fix wbcListUsers test
commitaf5d75d009eac8f24c44c407dbe4efebceaff695
authorChristof Schmitt <cs@samba.org>
Fri, 30 Mar 2018 21:28:46 +0000 (30 14:28 -0700)
committerKarolin Seeger <kseeger@samba.org>
Wed, 11 Apr 2018 06:51:24 +0000 (11 08:51 +0200)
tree5544623d0b72eeb98d73fcf085425d4339eb9914
parent705b1fa689829b0234209d245b950e3927439c15
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>
(cherry picked from commit 3c146be404affc894c0c702bbfbfcc4fb9ed902b)
nsswitch/libwbclient/tests/wbclient.c