Changeset 746 for vendor/current/nsswitch
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- Location:
- vendor/current/nsswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/nsswitch/pam_winbind.c
r740 r746 438 438 } 439 439 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) { 441 441 ctrl |= WINBIND_KRB5_CCACHE_TYPE; 442 442 } 443 443 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) 445 445 != NULL) || 446 (iniparser_getstr (d, CONST_DISCARD(char *, "global:require_membership_of"))446 (iniparser_getstring(d, CONST_DISCARD(char *, "global:require_membership_of"), NULL) 447 447 != NULL)) { 448 448 ctrl |= WINBIND_REQUIRED_MEMBERSHIP; … … 832 832 _pam_log(ctx, LOG_CRIT, "Received [%s] reply from application.\n", resp->resp); 833 833 834 if ( strcasecmp(resp->resp, "yes") == 0) {834 if ((resp->resp != NULL) && (strcasecmp(resp->resp, "yes") == 0)) { 835 835 retval = true; 836 836 } … … 2064 2064 switch (wbc_status) { 2065 2065 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: 2066 2069 return 1; 2067 2070 case WBC_ERR_SUCCESS: … … 2278 2281 } 2279 2282 2280 parm_opt = iniparser_getstr (ctx->dict, key);2283 parm_opt = iniparser_getstring(ctx->dict, key, NULL); 2281 2284 TALLOC_FREE(key); 2282 2285 -
vendor/current/nsswitch/winbind_krb5_locator.c
r597 r746 183 183 { 184 184 struct addrinfo *out = NULL; 185 int ret; 185 int ret = 0; 186 struct addrinfo *res = NULL; 186 187 int count = 3; 187 188 … … 207 208 } 208 209 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 } 219 229 return ret; 220 230 } … … 258 268 flags = WBC_LOOKUP_DC_KDC_REQUIRED | 259 269 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; 262 271 263 272 wbc_status = wbcLookupDomainControllerEx(realm, NULL, NULL, flags, &dc_info); … … 269 278 #endif 270 279 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++;277 280 } 278 281
Note:
See TracChangeset
for help on using the changeset viewer.