s3:winbindd: never mark external domains as internal!
authorStefan Metzmacher <metze@samba.org>
Tue, 23 Feb 2010 07:42:41 +0000 (08:42 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 7 Apr 2010 12:00:05 +0000 (14:00 +0200)
This way we can endup with silently using builtin_passdb_methods
for an ad domain without an inbound trust.

This fixes bug #7170.

metze
(cherry picked from commit f924b7749280b31ece19885de1c3ad1bd71942ac)
(cherry picked from commit 1ea768baa9bb38533d4bd273d6c4e7b1f5fd12bd)

source3/winbindd/winbindd_cm.c

index 4e27cc3a0154718f0ae43034fe30f1ae252af5e0..6fbb0b91f91219939514952f6bef2764d6f0d9d3 100644 (file)
@@ -1617,7 +1617,7 @@ static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain)
        NTSTATUS result;
 
        /* Internal connections never use the network. */
-       if (domain->internal) {
+       if (domain->internal || !winbindd_can_contact_domain(domain)) {
                domain->initialized = True;
                return NT_STATUS_OK;
        }
@@ -1745,9 +1745,6 @@ static bool set_dc_type_and_flags_trustinfo( struct winbindd_domain *domain )
 
                        domain->initialized = True;
 
-                       if ( !winbindd_can_contact_domain( domain) )
-                               domain->internal = True;
-
                        break;
                }               
        }