about summary refs log tree commit diff
path: root/resolv/ns_name.c
Commit message (Collapse)AuthorAgeFilesLines
* resolv: Move ns_name_compress into its own file and into libcFlorian Weimer2021-07-191-27/+0
| | | | | | | | | And reformat to GNU style. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move ns_name_pack into its own file and into libcFlorian Weimer2021-07-191-194/+0
| | | | | | | | | And reformat to GNU style, and eliminate the labellen function. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move ns_name_pton into its own file and into libcFlorian Weimer2021-07-191-125/+0
| | | | | | | | | And reformat to GNU style, and eliminate the digits variable. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move ns_name_uncompress into its own file and into libcFlorian Weimer2021-07-191-24/+0
| | | | | | | | | | And reformat to GNU style. Check for negative error returns (instead of -1). The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move ns_name_skip to its own file and into libc (bug 28091)Florian Weimer2021-07-191-37/+0
| | | | | | | | | | And reformat to GNU style. Avoid out-of-bounds pointer arithmetic. This also results in a fix of bug 28091 due to the additional packet length checks. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
* resolv: Move ns_name_unpack to its own file and into libcFlorian Weimer2021-07-151-81/+0
| | | | | | | | | | Reformat to GNU style. Avoid out-of-bounds buffer arithmetic. Eliminate the labellen function. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move ns_name_ntop to its own file and into libcFlorian Weimer2021-07-151-127/+1
| | | | | | | | | | | | Reformat to GNU style. Avoid out-of-bounds pointer arithmetic (e.g., use eom - dn < 2 instead of dn + 1 >= eom). Inline the labellen function and fold the compression pointer check into the length check (l >= 64). Assume ASCII encoding. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* resolv: ns_name_pton should report trailing \ as error [BZ #22413]Florian Weimer2017-11-111-0/+5
|
* resolv: Support an exactly sized buffer in ns_name_pack [BZ #21359]Florian Weimer2017-04-131-1/+1
| | | | | | | This bug did not affect name resolution because those functions indirectly call ns_name_pack with a buffer which is always larger than the generated query packet, even in the case of the longest-possible domain name.
* resolv: Remove RES_USEBSTRING and its implementation [BZ #20629]Florian Weimer2016-10-071-248/+8
| | | | | | In ns_name_ntop, the NS_CMPRSFLGS check is no longer needed because labellen (called earlier) already rejects everything which is not a plain label (compression references and extended label types).
* resolv: Remove SCCS and RCS keywordsFlorian Weimer2016-04-281-4/+0
|
* Fix typos.Ondřej Bílka2013-08-301-1/+1
|
* Fix typos.Ondřej Bílka2013-08-211-1/+1
|
* * Versions.def: Add GLIBC_2.9 to libresolv.Ulrich Drepper2008-08-011-181/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/resolv.h: Remove hidden proto declarations for __ns_* functions. Add them for __dn_count_labels and __p_secstodate. * include/arpa/nameser.h: Add a number of hidden proto declarations. Define ns_msg_getflags macro here. * resolv/res_debug.c: Add hidden definition for __dn_count_labels and __p_secstodate. * resolv/Versions: Export functions from <arpa/nameser.h> from libresolv in version GLIBC_2.9. * resolv/ns_name.c: Integrate changes from bind 9.5.0. Add necessary hidden definitions. * resolv/ns_netint.c: Likewise. * resolv/ns_parse.c: Likewise. * resolv/ns_print.c: Likewise. * resolv/ns_samedomain.c: Likewise. * resolv/ns_ttl.c: Likewise. * resolv/arpa/nameser_compat.h: Likewise. * resolv/arpa/nameser.h: Likewise. Remove macros which redirect function calls. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Use __ns_get16 instead of ns_get16. * resolv/nss_dns/dns-host.c (getanswer_r): Use __ns_get16 and __ns_get32 instead of ns_get16 and ns_get32 respectively. (gaih_getanswer_slice): Likewise. * resolv/Makefile (libresolv-routines): Add ns_date. * resolv/ns_date.c: New file.
* Update.Ulrich Drepper2004-10-181-0/+2
| | | | | | | | | | | | | | | | | | 2004-10-17 Ulrich Drepper <drepper@redhat.com> * include/libc-symbols.h: Define libresolv_hidden_proto and friends. * include/resolv.h: Add libresolv_hidden_proto for symbols defined, used, and exported in libresolv. * resolv/base64.c: Add libresolv_hidden_def. * resolv/gethnamaddr.c: Likewise. * resolv/ns_name.c: Likewise. * resolv/ns_netint.c: Likewise. * resolv/res_comp.c: Likewise. * resolv/res_data.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/res_mkquery.c: Likewise. * resolv/res_query.c: Likewise. * resolv/res_send.c: Likewise.
* Update.Ulrich Drepper2003-10-261-6/+4
| | | | | | * sysdeps/generic/glob.c (glob): Handle GLOB_BRACE and escaping correctly. * posix/globtest.sh: Add tests for GLOB_BRACE and escaping.
* Update.Ulrich Drepper2003-10-261-9/+90
| | | | | | | | | | 2003-10-26 Ulrich Drepper <drepper@redhat.com> * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Default reverse lookup format for IPv6 addresses is using bitfields and .ip6.arpa suffix. * resolv/ns_name.c: Implement encoding and decoding bitfields in hex format.
* Update.Ulrich Drepper2000-07-191-31/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-18 Mark Kettenis <kettenis@gnu.org> Update resolver code to BIND 8.2.3-T5B. * resolv/Versions [GLIBC_2.2] (libc): Add __res_init and __res_nclose. [GLIBC_2.2] (libresolv): Add __dn_expand, __ns_samename, __res_mkquery, __res_nsend, __res_query, __res_querydomain and __res_search. * resolv/Banner: BIND-8.2.3-T5B. * resolv/base64.c: Update from BIND 8.2.3-T5B. * resolv/herror.c: Likewise. * resolv/inet_addr.c: Likewise. * resolv/inet_net_ntop.c: Likewise. * resolv/inet_net_pton.c: Likewise. * resolv/inet_neta.c: Likewise. * resolv/inet_ntop.c: Likewise. * resolv/nsap_addr.c: Likewise. * resolv/inet_pton.c: Likewise. Reject a few more more invalid IPv6 addresses (ISC bug #520). * resolv/ns_name.c: Avoid emitting RCS ID in object file. * resolv/ns_parse.c: Likewise. * resolv/ns_netint.c: Likewise. * resolv/ns_samedomain.c: Likewise. * resolv/ns_ttl.c: Likewise. * resolv/ns_print.c: Update from BIND 8.2.3-T5B. Avoid emitting RCS ID in object file. * resolv/res_debug.c: Update from BIND 8.2.3-T5B. * resolv/res_mkquery.c: Likewise. * resolv/res_query.c: Likewise. * resolv/res_init.c: Likewise. (res_setoptions): Mark internal. * resolv/res_send.c: Likewise. [_LIBC]: Fully reinstate the code that avoids the FD_SETSIZE limit by using poll instead. * resolv/res_comp.c: Likewise. [SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_2)]: Make dn_expand a weak alias for __dn_expand. * resolv/res_data.c: Likewise. (res_close) [_LIBC]: Don't call res_nclose if RES_INIT isn't set in _res.options. Avoids a potential security risk by avoiding a close (0). [SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_2)]: Make res_mkquery, res_query, res_querydomain adn res_search weak aliases for __res_mkquery, __res_query, __res_querydomain and __res_search. * resolv/res_libc.c: (_res): Don't initialize. Fix res_close instead to avoid close(0). (res_init): Always use the static resolver context. [SHLIB_COMPAT (libc, GLIBC_2.0, GLIBC_2_2)]: Make res_init a weak alias for __res_init. * resolv/resolv.h: Update from BIND 8.2.3-T5B. Move definition of RES_SET_H_ERRNO and accompanying comment to... * include/resolv.h: ... here. * resolv/arpa/namser.h: Update from BIND 8.2.3-T5B. * resolv/arpa/nameser_compat.h: Likewise.
* Update.Ulrich Drepper1999-12-041-0/+636
1999-12-03 Andreas Jaeger <aj@suse.de> * nss/getXXbyYY.c: Include <resolv.h> (FUNCTION_NAME): Use res_ninit instead of res_init. * nss/getXXbyYY_r.c [NEED__RES]: Include <resolv.h> for _res declaration and prototypes. Remove extra _res declaration. (INTERNAL): Use thread aware res_ninit function. * inet/gethstbyad_r.c: Include <resolv.h>. * resolv/res_data.c: Update from Bind 8.2.2-P5. Moved res_init to res_libc.c. Disabled unneeded functions. * resolv/res_libc.c: New file. * Versions.def: Add version GLIBC_2.2 for libpthread. Add versions GLIBC_2.1 and GLIBC_2.2 for libresolv. * include/resolv.h: Add internal interfaces. * resolv/Makefile (routines): Add new files. (libresolv-routines): Likewise. (distribute): Likewise. * resolv/gethnamaddr.c: Use thread safe resolver functions. * resolv/nss_dns/dns-host.c: Likewise. * resolv/nss_dns/dns-network.c: Likewise. * resolv/arpa/nameser.h: Update from Bind 8.2.2-P5. * resolv/nsap_addr.c: Likewise. * resolv/res_comp.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/res_init.c: Likewise. * resolv/res_mkquery.c: Likewise. * resolv/res_query.c: Likewise. * resolv/res_send.c: Likewise. * resolv/resolv.h: Likewise. * resolv/Versions: Add __res_state and __res_ninit with version GLIBC_2.2 to libc. Add new interfaces with version GLIBC_2.2 to libresolv. * resolv/Banner: Update. * include/arpa/nameser_compat.h: New file. * resolv/ns_name.c: New file from Bind 8.2.2-P5. * resolv/ns_netint.c: Likewise. * resolv/ns_parse.c: Likewise. * resolv/ns_print.c: Likewise. * resolv/ns_samedomain.c: Likewise. * resolv/ns_ttl.c: Likewise. * resolv/arpa/nameser_compat.h: Likewise. * resolv/res_debug.h: Likewise. Some patches are based on work done by Adam D. Bradley <artdodge@cs.bu.edu>. * sysdeps/unix/sysv/linux/configure.in: Remove check for ldconfig, set always use_ldconfig instead.