Ignore:
Timestamp:
May 26, 2009, 9:44:50 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/winbindd/winbindd_util.c

    r204 r228  
    110110        struct winbindd_domain *domain;
    111111        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
    113122        /* ignore alt_name if we are not in an AD domain */
    114        
     123
    115124        if ( (lp_security() == SEC_ADS) && alt_name && *alt_name) {
    116125                alternative_name = alt_name;
    117126        }
    118        
     127
    119128        /* We can't call domain_list() as this function is called from
    120129           init_domain_list() and we'll get stuck in a loop. */
     
    403412                }
    404413
     414                if (d == NULL) {
     415                        continue;
     416                }
     417
    405418                DEBUG(10,("rescan_forest_root_trusts: Following trust path "
    406419                          "for domain tree root %s (%s)\n",
     
    466479                                                        &cache_methods,
    467480                                                        &dom_list[i].sid );
     481                        }
     482
     483                        if (d == NULL) {
     484                                continue;
    468485                        }
    469486                       
     
    10251042
    10261043        while(temp != NULL) {
    1027                 struct getent_state *next;
     1044                struct getent_state *next = temp->next;
    10281045
    10291046                /* Free sam entries then list entry */
     
    10311048                SAFE_FREE(state->sam_entries);
    10321049                DLIST_REMOVE(state, state);
    1033                 next = temp->next;
    10341050
    10351051                SAFE_FREE(temp);
     
    11271143        }
    11281144
    1129         safe_strcpy(buf, user, *len);
     1145        safe_strcpy((char *)buf, user, *len);
    11301146}
    11311147
     
    11801196}
    11811197
     1198/**
     1199 * talloc version of fill_domain_username()
     1200 * return NULL on talloc failure.
     1201 */
     1202char *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
    11821225/*
    11831226 * Winbindd socket accessor functions
Note: See TracChangeset for help on using the changeset viewer.