port latest changes from SAMBA_3_0 tree
[samba.git] / source3 / lib / username.c
index 98b8f33aae30990e5b245febdec17903150b310d..6321d4702127b402cd1d8af5c5bfdf6c50e689a6 100644 (file)
@@ -386,7 +386,7 @@ static BOOL user_in_winbind_group_list(const char *user, const char *gname, BOOL
        if ( DEBUGLEVEL >= 10 ) {
                DEBUG(10,("user_in_winbind_group_list: using groups -- "));
                for ( i=0; i<num_groups; i++ )
-                       DEBUGADD(10,("%d ", groups[i]));
+                       DEBUGADD(10,("%lu ", (unsigned long)groups[i]));
                DEBUGADD(10,("\n"));    
        }
  
@@ -593,7 +593,7 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr
                                   will return domain local groups; while NT4 or mixed mode 2k DCs
                                   will not */
                        
-                               if ( winbind_lookup_name(NULL, *list, &g_sid, &name_type) 
+                               if ( winbind_lookup_name(domain, groupname, &g_sid, &name_type) 
                                        && ( name_type==SID_NAME_DOM_GRP || 
                                           (strequal(lp_workgroup(), domain) && name_type==SID_NAME_ALIAS) ) )
                                {