Fix wbinfo -a trusted\\user%password on a Samba DC with trusts
authorVolker Lendecke <vl@samba.org>
Thu, 27 Mar 2008 12:00:23 +0000 (13:00 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 27 Mar 2008 12:11:10 +0000 (13:11 +0100)
Winbind can't be allowed to connect to the local smbd.

source/winbindd/winbindd_cache.c
source/winbindd/winbindd_dual.c

index 4d81ee39600e5a1a071d43d1e3186b560bf7149b..a8a98e5bc8713ac5924227b069c66699d1cba63d 100644 (file)
@@ -37,6 +37,7 @@ extern bool opt_nocache;
 #ifdef HAVE_ADS
 extern struct winbindd_methods ads_methods;
 #endif
 #ifdef HAVE_ADS
 extern struct winbindd_methods ads_methods;
 #endif
+extern struct winbindd_methods passdb_methods;
 
 /*
  * JRA. KEEP THIS LIST UP TO DATE IF YOU ADD CACHE ENTRIES.
 
 /*
  * JRA. KEEP THIS LIST UP TO DATE IF YOU ADD CACHE ENTRIES.
@@ -135,6 +136,10 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
 
        /* We have to know what type of domain we are dealing with first. */
 
 
        /* We have to know what type of domain we are dealing with first. */
 
+       if (domain->internal) {
+               domain->backend = &passdb_methods;
+               domain->initialized = True;
+       }
        if ( !domain->initialized ) {
                init_dc_connection( domain );
        }
        if ( !domain->initialized ) {
                init_dc_connection( domain );
        }
index 2b756b24d17f1a88e5dd9f9b76bf3f34f69e0653..3c342e54a4753be874af18a656f66365a75f4b13 100644 (file)
@@ -1089,7 +1089,6 @@ static bool fork_domain_child(struct winbindd_child *child)
         * but not the main daemon */
 
        if (child->domain && child->domain->internal && IS_DC) {
         * but not the main daemon */
 
        if (child->domain && child->domain->internal && IS_DC) {
-               child->domain->internal = False;
                child->domain->methods = &cache_methods;
                child->domain->online = False;
        }
                child->domain->methods = &cache_methods;
                child->domain->online = False;
        }