s3-passdb: Respect LOOKUP_NAME_GROUP flag in sid lookup.
authorJustin Maggard <jmaggard@netgear.com>
Tue, 21 Jul 2015 22:17:30 +0000 (15:17 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 28 Jul 2015 19:35:58 +0000 (21:35 +0200)
commitdc99d451bf23668d73878847219682fced547622
treea8ef0585d1fac3823dc2702af7947e8858c169e7
parentadbd6d32531a339046a2bcf73d3f22ee34d7184b
s3-passdb: Respect LOOKUP_NAME_GROUP flag in sid lookup.

Somewhere along the line, a config line like "valid users = @foo"
broke when "foo" also exists as a user.

user_ok_token() already does the right thing by adding the LOOKUP_NAME_GROUP
flag; but lookup_name() was not respecting that flag, and went ahead and looked
for users anyway.

Regression test to follow.

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

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 28 21:35:58 CEST 2015 on sn-devel-104
source3/passdb/lookup_sid.c
source3/passdb/lookup_sid.h