From: Michael Adam Date: Mon, 26 May 2008 10:11:21 +0000 (+0200) Subject: passdb: in get_trust_pw_clear() correctly fail if trusted domains not supported X-Git-Tag: samba-3.3.0pre1~1125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b26bcd3becb869319bca48bbf244c18b6e8e3dd;p=thirdparty%2Fsamba.git passdb: in get_trust_pw_clear() correctly fail if trusted domains not supported (but trusted domain situation was found) This completes the fix for bugs #5425 and #5451 by Steven Dannemann, in that now no special cases are left uncovered. Michael --- diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index 2df2a9c3ce9..874355da67a 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -1543,7 +1543,11 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd, /* if we are a DC and this is not our domain, then lookup an account * for the domain trust */ - if (is_trusted_domain_situation(domain)) { + if (is_dc_trusted_domain_situation(domain)) { + if (!lp_allow_trusted_domains()) { + return false; + } + if (!pdb_get_trusteddom_pw(domain, ret_pwd, NULL, &last_set_time)) {