Ignore:
Timestamp:
Sep 24, 2009, 9:15:13 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.14 (final)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/nsswitch/pam_winbind.c

    r232 r335  
    19111911        int account_name_len;
    19121912        char sep;
     1913        char *p;
     1914        char *name;
     1915        char *domain;
    19131916
    19141917        /* This cannot work when the winbind separator = @ */
     
    19191922        }
    19201923
     1924        name = strdup(upn);
     1925        if (!name) {
     1926                return NULL;
     1927        }
     1928        if ((p = strchr(name, '@')) != NULL) {
     1929                *p = 0;
     1930                domain = p + 1;
     1931        }
     1932
    19211933        /* Convert the UPN to a SID */
    19221934
     
    19241936        ZERO_STRUCT(resp);
    19251937
    1926         strncpy(req.data.name.dom_name, "",
     1938        strncpy(req.data.name.dom_name, domain,
    19271939                sizeof(req.data.name.dom_name) - 1);
    1928         strncpy(req.data.name.name, upn,
     1940        strncpy(req.data.name.name, name,
    19291941                sizeof(req.data.name.name) - 1);
    19301942        retval = pam_winbind_request_log(ctx, WINBINDD_LOOKUPNAME,
     
    19481960                                    resp.data.name.dom_name,
    19491961                                    resp.data.name.name);
     1962        SAFE_FREE(name);
    19501963
    19511964        return account_name;
Note: See TracChangeset for help on using the changeset viewer.