r25086: Fix interdomain trusts (this povides the fix expected in r22709):
authorMichael Adam <obnox@samba.org>
Tue, 11 Sep 2007 16:15:36 +0000 (16:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:38 +0000 (12:30 -0500)
Fix winbindd on a Samba DC talking to a trusted domain DC by
making it use the trusted domain password...

Michael

I hope this does not brake any other setup.

source/nsswitch/winbindd_cm.c

index 1a9d2bbeff36f6269b45918acdfc98ae0926e78f..9ffb3dfb239bb6dc028c6a1ae8737d62a6141495 100644 (file)
@@ -2161,7 +2161,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
                return NT_STATUS_OK;
        }
 
-       if (domain->primary && !get_trust_pw(domain->name, mach_pwd, &sec_chan_type)) {
+       if ((IS_DC || domain->primary) && !get_trust_pw(domain->name, mach_pwd, &sec_chan_type)) {
                return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
        }
 
@@ -2171,7 +2171,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
                return result;
        }
 
-       if ( !domain->primary ) {
+       if ((!IS_DC) && (!domain->primary)) {
                /* Clear the schannel request bit and drop down */
                neg_flags &= ~NETLOGON_NEG_SCHANNEL;            
                goto no_schannel;