Changeset 134 for branches/samba-3.0/source/libads
- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- Location:
- branches/samba-3.0/source/libads
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/libads/dns.c
r62 r134 196 196 return False; 197 197 } 198 198 199 srv->hostname = talloc_strdup( ctx, dcname ); 200 201 DEBUG(10,("ads_dns_parse_rr_srv: Parsed %s [%u, %u, %u]\n", 202 srv->hostname, 203 srv->priority, 204 srv->weight, 205 srv->port)); 199 206 200 207 return True; … … 275 282 { 276 283 uint8 *buffer = NULL; 277 size_t buf_len ;284 size_t buf_len = 0; 278 285 int resp_len = NS_PACKETSZ; 279 286 … … 304 311 return NT_STATUS_UNSUCCESSFUL; 305 312 } 306 } while ( buf_len < resp_len && resp_len < MAX_DNS_PACKET_SIZE ); 307 313 314 /* On AIX, Solaris, and possibly some older glibc systems (e.g. SLES8) 315 truncated replies never give back a resp_len > buflen 316 which ends up causing DNS resolve failures on large tcp DNS replies */ 317 318 if (buf_len == resp_len) { 319 if (resp_len == MAX_DNS_PACKET_SIZE) { 320 DEBUG(1,("dns_send_req: DNS reply too large when resolving %s\n", 321 name)); 322 TALLOC_FREE( buffer ); 323 return NT_STATUS_BUFFER_TOO_SMALL; 324 } 325 326 resp_len = MIN(resp_len*2, MAX_DNS_PACKET_SIZE); 327 } 328 329 330 } while ( buf_len < resp_len && resp_len <= MAX_DNS_PACKET_SIZE ); 331 308 332 *buf = buffer; 309 333 *resp_length = resp_len; … … 375 399 struct dns_query q; 376 400 377 if ( !ads_dns_parse_query( ctx, buffer, buffer+resp_len, &p, &q ) ) { 378 DEBUG(1,("ads_dns_lookup_srv: Failed to parse query record!\n")); 401 if (!ads_dns_parse_query(ctx, buffer, 402 buffer+resp_len, &p, &q)) { 403 DEBUG(1,("ads_dns_lookup_srv: " 404 "Failed to parse query record [%d]!\n", rrnum)); 379 405 return NT_STATUS_UNSUCCESSFUL; 380 406 } … … 384 410 385 411 for ( rrnum=0; rrnum<answer_count; rrnum++ ) { 386 if ( !ads_dns_parse_rr_srv( ctx, buffer, buffer+resp_len, &p, &dcs[rrnum] ) ) { 387 DEBUG(1,("ads_dns_lookup_srv: Failed to parse answer record!\n")); 412 if (!ads_dns_parse_rr_srv(ctx, buffer, buffer+resp_len, 413 &p, &dcs[rrnum])) { 414 DEBUG(1,("ads_dns_lookup_srv: " 415 "Failed to parse answer recordi [%d]!\n", rrnum)); 388 416 return NT_STATUS_UNSUCCESSFUL; 389 417 } … … 397 425 struct dns_rr rr; 398 426 399 if ( !ads_dns_parse_rr( ctx, buffer, buffer+resp_len, &p, &rr ) ) { 400 DEBUG(1,("ads_dns_lookup_srv: Failed to parse authority record!\n")); 427 if (!ads_dns_parse_rr( ctx, buffer, 428 buffer+resp_len, &p, &rr)) { 429 DEBUG(1,("ads_dns_lookup_srv: " 430 "Failed to parse authority record! [%d]\n", rrnum)); 401 431 return NT_STATUS_UNSUCCESSFUL; 402 432 } … … 409 439 int i; 410 440 411 if ( !ads_dns_parse_rr( ctx, buffer, buffer+resp_len, &p, &rr ) ) { 412 DEBUG(1,("ads_dns_lookup_srv: Failed to parse additional records section!\n")); 441 if (!ads_dns_parse_rr(ctx, buffer, buffer+resp_len, 442 &p, &rr)) { 443 DEBUG(1,("ads_dns_lookup_srv: Failed " 444 "to parse additional records section! [%d]\n", rrnum)); 413 445 return NT_STATUS_UNSUCCESSFUL; 414 446 } -
branches/samba-3.0/source/libads/kerberos_verify.c
r22 r134 129 129 * as krb5_ktfile_get_entry will explicitly 130 130 * close the krb5_keytab as soon as krb5_rd_req 131 * has suc essfully decrypted the ticket but the131 * has successfully decrypted the ticket but the 132 132 * ticket is not valid yet (due to clockskew) 133 133 * there is no point in querying more keytab -
branches/samba-3.0/source/libads/ldap.c
r62 r134 789 789 /* this relies on the way that ldap_add_result_entry() works internally. I hope 790 790 that this works on all ldap libs, but I have only tested with openldap */ 791 for (msg = ads_first_ entry(ads, res2); msg; msg = next) {792 next = ads_next_ entry(ads, msg);791 for (msg = ads_first_message(ads, res2); msg; msg = next) { 792 next = ads_next_message(ads, msg); 793 793 ldap_add_result_entry((LDAPMessage **)res, msg); 794 794 } … … 1924 1924 1925 1925 /** 1926 * pull the first message from a ADS result 1927 * @param ads connection to ads server 1928 * @param res Results of search 1929 * @return first message from result 1930 **/ 1931 LDAPMessage *ads_first_message(ADS_STRUCT *ads, LDAPMessage *res) 1932 { 1933 return ldap_first_message(ads->ld, res); 1934 } 1935 1936 /** 1937 * pull the next message from a ADS result 1938 * @param ads connection to ads server 1939 * @param res Results of search 1940 * @return next message from result 1941 **/ 1942 LDAPMessage *ads_next_message(ADS_STRUCT *ads, LDAPMessage *res) 1943 { 1944 return ldap_next_message(ads->ld, res); 1945 } 1946 1947 /** 1926 1948 * pull a single string from a ADS result 1927 1949 * @param ads connection to ads server
Note:
See TracChangeset
for help on using the changeset viewer.