Ignore:
Timestamp:
May 27, 2007, 12:26:26 AM (18 years ago)
Author:
Paul Smedley
Message:

Upgrade source to 3.0.25a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/nsswitch/winbindd_cache.c

    r30 r39  
    17771777        *alias_rids = NULL;
    17781778
    1779         (*alias_rids) = TALLOC_ARRAY(mem_ctx, uint32, *num_aliases);
    1780 
    1781         if ((*num_aliases != 0) && ((*alias_rids) == NULL)) {
    1782                 centry_free(centry);
    1783                 return NT_STATUS_NO_MEMORY;
     1779        if (*num_aliases) {
     1780                (*alias_rids) = TALLOC_ARRAY(mem_ctx, uint32, *num_aliases);
     1781
     1782                if ((*alias_rids) == NULL) {
     1783                        centry_free(centry);
     1784                        return NT_STATUS_NO_MEMORY;
     1785                }
     1786        } else {
     1787                (*alias_rids) = NULL;
    17841788        }
    17851789
     
    19431947        *num_domains = centry_uint32(centry);
    19441948       
    1945         (*names)        = TALLOC_ARRAY(mem_ctx, char *, *num_domains);
    1946         (*alt_names)    = TALLOC_ARRAY(mem_ctx, char *, *num_domains);
    1947         (*dom_sids)     = TALLOC_ARRAY(mem_ctx, DOM_SID, *num_domains);
     1949        if (*num_domains) {
     1950                (*names)        = TALLOC_ARRAY(mem_ctx, char *, *num_domains);
     1951                (*alt_names)    = TALLOC_ARRAY(mem_ctx, char *, *num_domains);
     1952                (*dom_sids)     = TALLOC_ARRAY(mem_ctx, DOM_SID, *num_domains);
    19481953 
    1949         if (! (*dom_sids) || ! (*names) || ! (*alt_names)) {
    1950                 smb_panic("trusted_domains out of memory");
    1951         }
     1954                if (! (*dom_sids) || ! (*names) || ! (*alt_names)) {
     1955                        smb_panic("trusted_domains out of memory");
     1956                }
     1957        } else {
     1958                (*names) = NULL;
     1959                (*alt_names) = NULL;
     1960                (*dom_sids) = NULL;
     1961        }
    19521962 
    19531963        for (i=0; i<(*num_domains); i++) {
     
    21312141{
    21322142        struct winbind_cache *cache;
    2133        
     2143
     2144        /* dont clear cached U/SID and UG/SID entries when we want to logon
     2145         * offline - gd */
     2146
     2147        if (lp_winbind_offline_logon()) {
     2148                return;
     2149        }
     2150
    21342151        if (!domain)
    21352152                return;
Note: See TracChangeset for help on using the changeset viewer.