Ignore:
Timestamp:
May 20, 2009, 6:46:53 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.4

File:
1 edited

Legend:

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

    r141 r204  
    7676        } } while(0)
    7777
    78 static struct idmap_methods *get_methods(struct idmap_backend *be,
    79                                          const char *name)
     78static struct idmap_methods *get_methods(const char *name)
    8079{
    8180        struct idmap_backend *b;
    8281
    83         for (b = be; b; b = b->next) {
     82        for (b = backends; b; b = b->next) {
    8483                if (strequal(b->name, name)) {
    8584                        return b->methods;
     
    9089}
    9190
    92 static struct idmap_alloc_methods *get_alloc_methods(
    93                                                 struct idmap_alloc_backend *be,
    94                                                 const char *name)
     91static struct idmap_alloc_methods *get_alloc_methods(const char *name)
    9592{
    9693        struct idmap_alloc_backend *b;
    9794
    98         for (b = be; b; b = b->next) {
     95        for (b = alloc_backends; b; b = b->next) {
    9996                if (strequal(b->name, name)) {
    10097                        return b->methods;
     
    141138        }
    142139
    143         test = get_methods(backends, name);
     140        test = get_methods(name);
    144141        if (test) {
    145142                DEBUG(0,("Idmap module %s already registered!\n", name));
     
    194191        }
    195192
    196         test = get_alloc_methods(alloc_backends, name);
     193        test = get_alloc_methods(name);
    197194        if (test) {
    198195                DEBUG(0,("idmap_alloc module %s already registered!\n", name));
     
    455452
    456453                /* get the backend methods for this domain */
    457                 dom->methods = get_methods(backends, parm_backend);
     454                dom->methods = get_methods(parm_backend);
    458455
    459456                if ( ! dom->methods) {
    460457                        ret = smb_probe_module("idmap", parm_backend);
    461458                        if (NT_STATUS_IS_OK(ret)) {
    462                                 dom->methods = get_methods(backends,
    463                                                            parm_backend);
     459                                dom->methods = get_methods(parm_backend);
    464460                        }
    465461                }
     
    542538
    543539                /* get the backend methods for this domain */
    544                 dom->methods = get_methods(backends, compat_backend);
    545 
     540                dom->methods = get_methods(compat_backend);
    546541                if ( ! dom->methods) {
    547542                        ret = smb_probe_module("idmap", compat_backend);
    548543                        if (NT_STATUS_IS_OK(ret)) {
    549                                 dom->methods = get_methods(backends,
    550                                                            compat_backend);
     544                                dom->methods = get_methods(compat_backend);
    551545                        }
    552546                }
     
    607601                dom->readonly = True;
    608602
    609                 /* get the backend methods for passdb */
    610                 dom->methods = get_methods(backends, "nss");
     603                /* get the backend methods for nss */
     604                dom->methods = get_methods("nss");
    611605
    612606                /* (the nss module is always statically linked) */
     
    664658
    665659        /* get the backend methods for passdb */
    666         dom->methods = get_methods(backends, "passdb");
     660        dom->methods = get_methods("passdb");
    667661
    668662        /* (the passdb module is always statically linked) */
     
    756750                IDMAP_CHECK_ALLOC(idmap_alloc_ctx);
    757751
    758                 idmap_alloc_ctx->methods = get_alloc_methods(alloc_backends,
    759                                                              alloc_backend);
     752                idmap_alloc_ctx->methods = get_alloc_methods(alloc_backend);
    760753                if ( ! idmap_alloc_ctx->methods) {
    761754                        ret = smb_probe_module("idmap", alloc_backend);
    762755                        if (NT_STATUS_IS_OK(ret)) {
    763756                                idmap_alloc_ctx->methods =
    764                                         get_alloc_methods(alloc_backends,
    765                                                           alloc_backend);
     757                                        get_alloc_methods(alloc_backend);
    766758                        }
    767759                }
Note: See TracChangeset for help on using the changeset viewer.