Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | If we don't receive a reply packet the res_send subquery will already have | 2019-06-27 | 1 | -7/+5 | |
| | | | | | | | | | | | set subq_h_errno and ar_count. Remove the ar_datalen == -1 check, so we set ar_h_errno and don't have to (wrongly) guess that ar_h_errno = HOST_NOT_FOUND. This makes sure that if no nameserver responds the h_errno value is set to TRY_AGAIN instead of HOST_NOT_FOUND. OK eric@, deraadt@ | ||||
* | To allow us to get rid of /etc/networks, make getnetby*(3) | 2018-04-28 | 1 | -3/+67 | |
| | | | | | | wrappers around gethostby*_async(3). If you had anything of importance in /etc/networks, specify it in /etc/hosts instead. Feedback and OK eric@, OK deraadt@ | ||||
* | Put a common subq pointer in the query struct, rather than one in each | 2017-02-23 | 1 | -6/+6 | |
| | | | | | | element of the union. ok gilles@ millert@ krw@ | ||||
* | Remove support for HOSTALIASES from the resolver. This "open and parse | 2015-12-16 | 1 | -7/+3 | |
| | | | | | | | | any file indicated by an environment variable" feature inside the resolver is incompatible with what pledge "dns" is trying to be. It is a misguided "feature" added way back in history which almost noone uses, but everyone has to assume the risk from. ok eric florian kettenis | ||||
* | Remove support for "lookup yp" in /etc/resolv.conf. This historical | 2015-11-23 | 1 | -132/+1 | |
| | | | | | | | | wart is incompatible with pledge, because suddenly a "dns" operation needs "getpw" access to ypbind/ypserv, etc. file + dns access is enough for everyone, sorry if you were using that old SunOS 4.x style mechanism, but it is now gone. ok semarie millert florian | ||||
* | remove bogus includes of err.h | 2015-09-20 | 1 | -2/+1 | |
| | |||||
* | Wrap <asr.h> so internal calls go direct and all the symbols are weak | 2015-09-14 | 1 | -1/+4 | |
| | |||||
* | Hide all unnecessary asr / resolver related API with _ prefixes. | 2015-09-09 | 1 | -25/+25 | |
| | | | | direction & ok guenther | ||||
* | fix a possible off-by-one when reading /etc/hosts if it doesn't end | 2015-05-29 | 1 | -3/+3 | |
| | | | | | | with a newline. ok jca@ | ||||
* | simply use _PATH_HOSTS where appropriate | 2015-05-26 | 1 | -2/+2 | |
| | |||||
* | gethostbyname(3) would fail when more than 16 addrs/aliases were returned. | 2015-03-02 | 1 | -7/+7 | |
| | | | | | | | | | Bump MAXADDRS/ALIASES to the original of 35, and silently ignore extras instead of failing. Noticed by markson on freenode. OK eric@ "with revised diff", phessler@. | ||||
* | Move to the <limits.h> universe. | 2015-01-16 | 1 | -2/+2 | |
| | | | | review by millert, binary checking process with doug, concept with guenther | ||||
* | change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who include | 2015-01-14 | 1 | -7/+9 | |
| | | | | it to get limits.h early enough | ||||
* | Fix a NULL deref when getting an actual result for an invalid hostname | 2014-11-02 | 1 | -5/+4 | |
| | | | | | | in gethostbyname(). Similar fix for getnetbyname(). ok deraadt@ daniel@ jca@ | ||||
* | When fopen()ing internal to libc (the API doesn't support the use | 2014-09-15 | 1 | -2/+2 | |
| | | | | | | | of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@ | ||||
* | Make queries using the search list for hostname lookups fail with | 2014-07-23 | 1 | -2/+9 | |
| | | | | | | | | | | NO_DATA/EAI_NODATA when the hostname param is an empty string. So far, they were using the entries in the search list with no additional component, which is not really expected. reported by jsing@ and a few others ok deraadt@, "makes sense" jsing@ | ||||
* | skip incomplete entries in /etc/hosts and /etc/networks | 2014-05-13 | 1 | -1/+5 | |
| | | | | | | fix null deref spotted by Seth Hanford, pinpointed by dtucker@ ok florian@ | ||||
* | Make the asr API public. Install asr.h to /usr/include.h and manpages. | 2014-03-26 | 1 | -2/+3 | |
| | | | | | | Include tweaks suggested by mpi@ ok deraadt@ | ||||
* | Cleanup and simplify the API to be exposed. Use better names for | 2014-03-25 | 1 | -16/+16 | |
| | | | | | | structures, functions and defines. discussed with and ok deraadt@ guenther@ | ||||
* | prefix structure names to avoid ambiguity and possible collisions when | 2014-03-14 | 1 | -7/+7 | |
| | | | | | | the API gets public. ok deraadt@ | ||||
* | Do not restrict chars in dname during label expansion, but validate resulting | 2014-02-26 | 1 | -1/+6 | |
| | | | | | | hostnames before returning them to the caller. ok deraadt@ | ||||
* | report extra PTR records as aliases | 2014-02-17 | 1 | -3/+2 | |
| | |||||
* | most obvious unsigned char casts for ctype | 2013-11-24 | 1 | -2/+3 | |
| | | | | ok jca krw ingo | ||||
* | missing symbol rename. | 2013-07-17 | 1 | -2/+2 | |
| | |||||
* | Make some symbols static and prefix all visible symbols with asr_ | 2013-07-12 | 1 | -73/+10 | |
| | | | | | | to prevent collisions with third-party programs. suggested by sthen@, ok theo@ | ||||
* | Make hostaliases work for gethostbyname() and getaddrinfo() when | 2013-06-01 | 1 | -8/+16 | |
| | | | | | | looking into /etc/hosts. Remove the alias check from the search domain iteration. Instead, take a shortcut to res_query_async_ctx() in res_search_async_ctx(). | ||||
* | Do not take external buffers for storing DNS responses in the internal | 2013-04-30 | 1 | -3/+3 | |
| | | | | | async API. That is actually useless and it makes the code more complicated. The required buffers are always allocated when needed. | ||||
* | spacing | 2013-04-14 | 1 | -2/+2 | |
| | |||||
* | properly follow the CNAME chain in reverse lookups | 2013-04-03 | 1 | -5/+13 | |
| | | | | spotted by sthen@ | ||||
* | space cleanup; ok eric | 2013-04-01 | 1 | -2/+2 | |
| | |||||
* | rename field | 2013-04-01 | 1 | -4/+4 | |
| | |||||
* | Do not fail in gethostbyname_async() if there are multiple addresses in | 2013-03-29 | 1 | -3/+3 | |
| | | | | a DNS packet... | ||||
* | Only use the search domains for DNS lookups, as the current resolver does. | 2013-03-27 | 1 | -34/+12 | |
| | | | | | Better not diverge too much in behavior at this point. Typo fix and doc update while there. | ||||
* | Allow gethostbyname() to accept a numeric IP string. | 2012-12-17 | 1 | -4/+47 | |
| | | | | | | No lookup is done in this case. regression reported by espie@ | ||||
* | Saner implementation for self-contained hostent and netent, and also | 2012-11-24 | 1 | -95/+100 | |
| | | | | a couple of fixes. | ||||
* | knf | 2012-11-24 | 1 | -20/+22 | |
| | |||||
* | make separate structures for pack and unpack | 2012-11-24 | 1 | -3/+3 | |
| | |||||
* | include yp headers if necessary. | 2012-09-06 | 1 | -1/+7 | |
| | | | | remove unused variable. | ||||
* | implement basic YP support for gethostbyname_async()/gethostbyaddr_async() | 2012-09-04 | 1 | -1/+121 | |
| | | | | by using the blocking YP API internally. | ||||
* | When building dynamic hostent and netent, allocate a single linear buffer to | 2012-08-19 | 1 | -47/+42 | |
| | | | | | | hold both the structure and the data. The freehostent() and freenetent() API functions are not needed anymore. While there, ensure that the constructed addr and alias lists are really NULL terminated. | ||||
* | unused variables | 2012-07-12 | 1 | -2/+2 | |
| | |||||
* | simplify the code, improve error handling and plug a potential fd leak on error | 2012-07-10 | 1 | -71/+101 | |
| | |||||
* | use the value actually passed to the function | 2012-07-10 | 1 | -2/+2 | |
| | |||||
* | fix a few warnings | 2012-04-25 | 1 | -3/+3 | |
| | |||||
* | Import asr, an experimental async resolver implementation. | 2012-04-14 | 1 | -0/+592 | |
The idea is to eventually replace the existing resolver with something better. Time to start working on it in tree. ok deraadt@ |