Changeset 228 for branches/samba-3.2.x/source/winbindd/winbindd_util.c
- Timestamp:
- May 26, 2009, 9:44:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/winbindd/winbindd_util.c
r204 r228 110 110 struct winbindd_domain *domain; 111 111 const char *alternative_name = NULL; 112 112 const char **ignored_domains, **dom; 113 114 ignored_domains = lp_parm_string_list(-1, "winbind", "ignore domains", NULL); 115 for (dom=ignored_domains; dom && *dom; dom++) { 116 if (gen_fnmatch(*dom, domain_name) == 0) { 117 DEBUG(2,("Ignoring domain '%s'\n", domain_name)); 118 return NULL; 119 } 120 } 121 113 122 /* ignore alt_name if we are not in an AD domain */ 114 123 115 124 if ( (lp_security() == SEC_ADS) && alt_name && *alt_name) { 116 125 alternative_name = alt_name; 117 126 } 118 127 119 128 /* We can't call domain_list() as this function is called from 120 129 init_domain_list() and we'll get stuck in a loop. */ … … 403 412 } 404 413 414 if (d == NULL) { 415 continue; 416 } 417 405 418 DEBUG(10,("rescan_forest_root_trusts: Following trust path " 406 419 "for domain tree root %s (%s)\n", … … 466 479 &cache_methods, 467 480 &dom_list[i].sid ); 481 } 482 483 if (d == NULL) { 484 continue; 468 485 } 469 486 … … 1025 1042 1026 1043 while(temp != NULL) { 1027 struct getent_state *next ;1044 struct getent_state *next = temp->next; 1028 1045 1029 1046 /* Free sam entries then list entry */ … … 1031 1048 SAFE_FREE(state->sam_entries); 1032 1049 DLIST_REMOVE(state, state); 1033 next = temp->next;1034 1050 1035 1051 SAFE_FREE(temp); … … 1127 1143 } 1128 1144 1129 safe_strcpy( buf, user, *len);1145 safe_strcpy((char *)buf, user, *len); 1130 1146 } 1131 1147 … … 1180 1196 } 1181 1197 1198 /** 1199 * talloc version of fill_domain_username() 1200 * return NULL on talloc failure. 1201 */ 1202 char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx, 1203 const char *domain, 1204 const char *user, 1205 bool can_assume) 1206 { 1207 char *tmp_user, *name; 1208 1209 tmp_user = talloc_strdup(mem_ctx, user); 1210 strlower_m(tmp_user); 1211 1212 if (can_assume && assume_domain(domain)) { 1213 name = tmp_user; 1214 } else { 1215 name = talloc_asprintf(mem_ctx, "%s%c%s", 1216 domain, 1217 *lp_winbind_separator(), 1218 tmp_user); 1219 TALLOC_FREE(tmp_user); 1220 } 1221 1222 return name; 1223 } 1224 1182 1225 /* 1183 1226 * Winbindd socket accessor functions
Note:
See TracChangeset
for help on using the changeset viewer.