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)
committerStefan Metzmacher <metze@samba.org>
Mon, 3 Aug 2015 18:03:05 +0000 (20:03 +0200)
commit49e39b05ca637cce4621ac60ed3bb536c0ac544a
tree0abaab330bfc8d2dcc0f67c9d177d48effd6ccdd
parent516f518aa736d1f53c2e35c421f16f5090d51796
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.

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

(cherry picked from commit dc99d451bf23668d73878847219682fced547622)

Autobuild-User(v4-1-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-1-test): Mon Aug  3 20:03:05 CEST 2015 on sn-devel-104
source3/passdb/lookup_sid.c
source3/passdb/lookup_sid.h