Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/nsswitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/nsswitch/pam_winbind.c

    r740 r746  
    438438        }
    439439
    440         if (iniparser_getstr(d, CONST_DISCARD(char *, "global:krb5_ccache_type")) != NULL) {
     440        if (iniparser_getstring(d, CONST_DISCARD(char *, "global:krb5_ccache_type"), NULL) != NULL) {
    441441                ctrl |= WINBIND_KRB5_CCACHE_TYPE;
    442442        }
    443443
    444         if ((iniparser_getstr(d, CONST_DISCARD(char *, "global:require-membership-of"))
     444        if ((iniparser_getstring(d, CONST_DISCARD(char *, "global:require-membership-of"), NULL)
    445445             != NULL) ||
    446             (iniparser_getstr(d, CONST_DISCARD(char *, "global:require_membership_of"))
     446            (iniparser_getstring(d, CONST_DISCARD(char *, "global:require_membership_of"), NULL)
    447447             != NULL)) {
    448448                ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
     
    832832        _pam_log(ctx, LOG_CRIT, "Received [%s] reply from application.\n", resp->resp);
    833833
    834         if (strcasecmp(resp->resp, "yes") == 0) {
     834        if ((resp->resp != NULL) && (strcasecmp(resp->resp, "yes") == 0)) {
    835835                retval = true;
    836836        }
     
    20642064        switch (wbc_status) {
    20652065                case WBC_ERR_UNKNOWN_USER:
     2066                /* match other insane libwbclient return codes */
     2067                case WBC_ERR_WINBIND_NOT_AVAILABLE:
     2068                case WBC_ERR_DOMAIN_NOT_FOUND:
    20662069                        return 1;
    20672070                case WBC_ERR_SUCCESS:
     
    22782281                }
    22792282
    2280                 parm_opt = iniparser_getstr(ctx->dict, key);
     2283                parm_opt = iniparser_getstring(ctx->dict, key, NULL);
    22812284                TALLOC_FREE(key);
    22822285
  • vendor/current/nsswitch/winbind_krb5_locator.c

    r597 r746  
    183183{
    184184        struct addrinfo *out = NULL;
    185         int ret;
     185        int ret = 0;
     186        struct addrinfo *res = NULL;
    186187        int count = 3;
    187188
     
    207208        }
    208209
    209         ret = cbfunc(cbdata, out->ai_socktype, out->ai_addr);
    210 #ifdef DEBUG_KRB5
    211         if (ret) {
    212                 fprintf(stderr, "[%5u]: smb_krb5_locator_lookup: "
    213                         "failed to call callback: %s (%d)\n",
    214                         (unsigned int)getpid(), error_message(ret), ret);
    215         }
    216 #endif
    217 
    218         freeaddrinfo(out);
     210        for (res = out; res; res = res->ai_next) {
     211                if (!res->ai_addr || res->ai_addrlen == 0) {
     212                        continue;
     213                }
     214
     215                ret = cbfunc(cbdata, res->ai_socktype, res->ai_addr);
     216                if (ret) {
     217#ifdef DEBUG_KRB5
     218                        fprintf(stderr, "[%5u]: smb_krb5_locator_lookup: "
     219                                "failed to call callback: %s (%d)\n",
     220                                (unsigned int)getpid(), error_message(ret), ret);
     221#endif
     222                        break;
     223                }
     224        }
     225
     226        if (out) {
     227                freeaddrinfo(out);
     228        }
    219229        return ret;
    220230}
     
    258268        flags = WBC_LOOKUP_DC_KDC_REQUIRED |
    259269                WBC_LOOKUP_DC_IS_DNS_NAME |
    260                 WBC_LOOKUP_DC_RETURN_DNS_NAME |
    261                 WBC_LOOKUP_DC_IP_REQUIRED;
     270                WBC_LOOKUP_DC_RETURN_DNS_NAME;
    262271
    263272        wbc_status = wbcLookupDomainControllerEx(realm, NULL, NULL, flags, &dc_info);
     
    269278#endif
    270279                return false;
    271         }
    272 
    273         if (dc_info->dc_address) {
    274                 dc = dc_info->dc_address;
    275                 if (dc[0] == '\\') dc++;
    276                 if (dc[0] == '\\') dc++;
    277280        }
    278281
Note: See TracChangeset for help on using the changeset viewer.