From: Stefan Metzmacher Date: Tue, 9 Nov 2021 19:50:20 +0000 (+0100) Subject: s3:winbindd: fix "allow trusted domains = no" regression X-Git-Tag: ldb-2.5.0~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7f6c60cb037b4bc9eee276236539b8282213935;p=thirdparty%2Fsamba.git 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 Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Nov 10 11:21:31 UTC 2021 on sn-devel-184 --- diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index fe68adec534..a8c510fafc6 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -135,7 +135,7 @@ static NTSTATUS add_trusted_domain(const char *domain_name, return NT_STATUS_INVALID_PARAMETER; } - if (!is_allowed_domain(domain_name)) { + if (secure_channel_type == SEC_CHAN_NULL && !is_allowed_domain(domain_name)) { return NT_STATUS_NO_SUCH_DOMAIN; }