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

source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_dual.c

index a88a061686c7fb06432cfa645269ed33f4ad4b3b..42f5565854940c17d221950a44c7fb8b09246a87 100644 (file)
@@ -37,6 +37,7 @@ extern BOOL opt_nocache;
 #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.
@@ -136,6 +137,10 @@ static struct winbind_cache *get_cache(struct winbindd_domain *domain)
 
        /* 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 );
        }
index fa6add3aab3778bc1bdec5c3de4a75afe63488d2..7df630d6f93e56ed69ffde50f3d344f787b3c7fc 100644 (file)
@@ -994,7 +994,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
         * 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;
        }