Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/nsswitch/wbinfo.c

    r745 r862  
    13811381
    13821382        for (i=0; i<num_sids; i++) {
     1383                const char *domain = NULL;
     1384
    13831385                wbcSidToStringBuf(&sids[i], sidstr, sizeof(sidstr));
    13841386
    1385                 d_printf("%s -> %s\\%s %d\n", sidstr,
    1386                          domains[names[i].domain_index].short_name,
    1387                          names[i].name, names[i].type);
     1387                if (names[i].domain_index >= num_domains) {
     1388                        domain = "<none>";
     1389                } else if (names[i].domain_index < 0) {
     1390                        domain = "<none>";
     1391                } else {
     1392                        domain = domains[names[i].domain_index].short_name;
     1393                }
     1394
     1395                if (names[i].type == WBC_SID_NAME_DOMAIN) {
     1396                        d_printf("%s -> %s %d\n", sidstr,
     1397                                domain,
     1398                                names[i].type);
     1399                } else {
     1400                        d_printf("%s -> %s%c%s %d\n", sidstr,
     1401                                domain,
     1402                                winbind_separator(),
     1403                                names[i].name, names[i].type);
     1404                }
    13881405        }
    13891406        return true;
     
    17291746        wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
    17301747        struct wbcLogonUserParams params;
    1731         struct wbcAuthErrorInfo *error;
     1748        struct wbcAuthErrorInfo *error = NULL;
    17321749        char *s = NULL;
    17331750        char *p = NULL;
     
    17801797                 WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed");
    17811798
    1782         if (!WBC_ERROR_IS_OK(wbc_status)) {
     1799        if (!WBC_ERROR_IS_OK(wbc_status) && (error != NULL)) {
    17831800                d_fprintf(stderr,
    17841801                          "error code was %s (0x%x)\nerror message was: %s\n",
     
    17871804                          error->display_string);
    17881805                wbcFreeMemory(error);
    1789                 return false;
    1790         }
    1791         return true;
     1806        }
     1807        return WBC_ERROR_IS_OK(wbc_status);
    17921808}
    17931809
Note: See TracChangeset for help on using the changeset viewer.