Ignore:
Timestamp:
May 12, 2014, 8:58:38 PM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: updated vendor to latest version

Location:
vendor/current/nsswitch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/nsswitch/libwbclient/wbc_sid.c

    r740 r860  
    422422
    423423                names[i].domain_index = strtoul(p, &q, 10);
     424                if (names[i].domain_index < 0) {
     425                        goto wbc_err_invalid;
     426                }
     427                if (names[i].domain_index >= num_domains) {
     428                        goto wbc_err_invalid;
     429                }
     430
    424431                if (*q != ' ') {
    425432                        goto wbc_err_invalid;
  • vendor/current/nsswitch/pam_winbind.c

    r746 r860  
    11851185                                "to sid, please contact your administrator to see "
    11861186                                "if group %s is valid."), search_location, search_location);
     1187
     1188                /* If no valid groups were converted we should fail outright */
     1189                if (name_list != NULL && strlen(sid_list_buffer) == 0) {
     1190                        result = false;
     1191                        goto out;
     1192                }
    11871193                /*
    11881194                 * The lookup of the last name failed..
     
    24492455        }
    24502456
    2451         return talloc_asprintf(ctx, "%s\\%s", domain, name);
     2457        return talloc_asprintf(ctx, "%s%c%s", domain, sep, name);
    24522458}
    24532459
     
    27362742        }
    27372743
    2738         _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval);
    2739 
    2740         TALLOC_FREE(ctx);
     2744        if (ctx != NULL) {
     2745                _PAM_LOG_FUNCTION_LEAVE("pam_sm_authenticate", ctx, retval);
     2746                TALLOC_FREE(ctx);
     2747        }
    27412748
    27422749        return retval;
  • vendor/current/nsswitch/wb_common.c

    r740 r860  
    393393
    394394                pfd.fd = winbindd_fd;
    395                 pfd.events = POLLIN|POLLHUP;
    396 
    397                 ret = poll(&pfd, 1, 0);
     395                pfd.events = POLLIN|POLLOUT|POLLHUP;
     396
     397                ret = poll(&pfd, 1, -1);
    398398                if (ret == -1) {
    399399                        winbind_close_sock();
  • vendor/current/nsswitch/wbinfo.c

    r740 r860  
    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.