s3:winbindd: fix "allow trusted domains = no" regression
authorStefan Metzmacher <metze@samba.org>
Tue, 9 Nov 2021 19:50:20 +0000 (20:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 10 Nov 2021 23:29:45 +0000 (23:29 +0000)
commitdb4e342291f86c05fd548161c8c6b2c50e41f533
treedeea6fec42abf0ba1edbb54343c8b8bae840a3db
parent962b7b0f92d37867296b8e30c5ae659e9544a16f
s3:winbindd: fix "allow trusted domains = no" regression

add_trusted_domain() should only reject domains
based on is_allowed_domain(), which now also
checks "allow trusted domains = no", if we don't
have an explicit trust to the domain (SEC_CHAN_NULL).

We use at least SEC_CHAN_LOCAL for local domains like
BUILTIN.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov 10 11:21:31 UTC 2021 on sn-devel-184

(cherry picked from commit a7f6c60cb037b4bc9eee276236539b8282213935)

Autobuild-User(v4-15-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-15-test): Wed Nov 10 23:29:45 UTC 2021 on sn-devel-184
source3/winbindd/winbindd_util.c