]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
passdb: in get_trust_pw_clear() correctly fail if trusted domains not supported
authorMichael Adam <obnox@samba.org>
Mon, 26 May 2008 10:11:21 +0000 (12:11 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 26 May 2008 14:42:24 +0000 (16:42 +0200)
(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

source/passdb/passdb.c

index 2df2a9c3ce99eb3b5fcf0ea49784d9414931172b..874355da67a10f66aef2d200e5d03b3def6c127d 100644 (file)
@@ -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))
                {