Ignore:
Timestamp:
May 23, 2008, 6:56:41 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.29

Location:
branches/samba-3.0/source/libads
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/libads/dns.c

    r62 r134  
    196196                return False;
    197197        }
     198
    198199        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));
    199206
    200207        return True;
     
    275282{
    276283        uint8 *buffer = NULL;
    277         size_t buf_len;
     284        size_t buf_len = 0;
    278285        int resp_len = NS_PACKETSZ;     
    279286       
     
    304311                        return NT_STATUS_UNSUCCESSFUL;
    305312                }
    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
    308332        *buf = buffer;
    309333        *resp_length = resp_len;
     
    375399                struct dns_query q;
    376400
    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));
    379405                        return NT_STATUS_UNSUCCESSFUL;
    380406                }
     
    384410
    385411        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));
    388416                        return NT_STATUS_UNSUCCESSFUL;
    389417                }               
     
    397425                struct dns_rr rr;
    398426
    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));
    401431                        return NT_STATUS_UNSUCCESSFUL;
    402432                }
     
    409439                int i;
    410440
    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));
    413445                        return NT_STATUS_UNSUCCESSFUL;
    414446                }
  • branches/samba-3.0/source/libads/kerberos_verify.c

    r22 r134  
    129129                                * as krb5_ktfile_get_entry will explicitly
    130130                                * close the krb5_keytab as soon as krb5_rd_req
    131                                 * has sucessfully decrypted the ticket but the
     131                                * has successfully decrypted the ticket but the
    132132                                * ticket is not valid yet (due to clockskew)
    133133                                * there is no point in querying more keytab
  • branches/samba-3.0/source/libads/ldap.c

    r62 r134  
    789789                /* this relies on the way that ldap_add_result_entry() works internally. I hope
    790790                   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);
    793793                        ldap_add_result_entry((LDAPMessage **)res, msg);
    794794                }
     
    19241924
    19251925/**
     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/**
    19261948 * pull a single string from a ADS result
    19271949 * @param ads connection to ads server
Note: See TracChangeset for help on using the changeset viewer.