r23046: Few missing merges from cleaning out the Centeris winbindd tree.
authorGerald Carter <jerry@samba.org>
Mon, 21 May 2007 19:12:14 +0000 (19:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:22:17 +0000 (12:22 -0500)
Nothing of major interest.  Will fix a few problems with one way trusts.

source/nsswitch/winbindd.c
source/nsswitch/winbindd_rpc.c
source/nsswitch/winbindd_util.c
source/passdb/pdb_interface.c

index 790d59c08656bf6a7c81c82ae1261cd9eee685d5..ed0bdeb13ad360814ae75257bd26e2221c3254d8 100644 (file)
@@ -1164,6 +1164,10 @@ int main(int argc, char **argv, char **envp)
 
        wcache_tdc_clear();     
        
+       /* clear the cached list of trusted domains */
+
+       wcache_tdc_clear();     
+       
        if (!init_domain_list()) {
                DEBUG(0,("unable to initalize domain list\n"));
                exit(1);
index ee8044a6678b9a7eb8fd777b0a1cb0768ae1c843..4a6448348e9d943eeeb2194a30903d75731807b1 100644 (file)
@@ -458,6 +458,12 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
                return NT_STATUS_OK;
        }
        
+       if ( !winbindd_can_contact_domain( domain ) ) {
+               DEBUG(10,("query_user: No incoming trust for domain %s\n",
+                         domain->name));
+               return NT_STATUS_OK;
+       }
+       
        /* no cache; hit the wire */
                
        result = cm_connect_sam(domain, mem_ctx, &cli, &dom_pol);
index 231e11ae458e50d6e666e9b63cf7bf0224462d01..2bec404a1375b9b99cce48db1f6eaf0bf9a677d7 100644 (file)
@@ -148,6 +148,16 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
                return domain;          
        }       
         
+       /* See if we found a match.  Check if we need to update the
+          SID. */
+
+       if ( domain ) {
+               if ( sid_equal( &domain->sid, &global_sid_NULL ) )
+                       sid_copy( &domain->sid, sid );
+
+               return domain;          
+       }       
+        
        /* Create new domain entry */
 
        if ((domain = SMB_MALLOC_P(struct winbindd_domain)) == NULL)
index 819e98b38b9feebcfc91ced2da6d1bbb520db6f0..7f0555c9910a182c9ab594591194efcc1034b7b4 100644 (file)
@@ -1307,7 +1307,7 @@ static BOOL pdb_default_sid_to_id(struct pdb_methods *methods,
                goto done;              
        }
        
-       /* check for "Unix User" */
+       /* check for "Unix Group" */
 
        if ( sid_peek_check_rid(&global_sid_Unix_Groups, sid, &rid) ) {
                id->gid = rid;