aboutsummaryrefslogtreecommitdiff
path: root/posix/tst-rfc3484-2.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-24Move getaddrinfo from 'posix' into 'nss'Arjun Shankar1-189/+0
getaddrinfo is an entry point for nss functionality. This commit moves it from 'sysdeps/posix' to 'nss', gets rid of the stub in 'posix', and moves all associated tests as well. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-02-03 posix/tst-rfc3484: Fix compile failure linking to local __stat64Stafford Horne1-0/+1
After 04986243d1 ("Remove internal usage of extensible stat functions") linking the __stat64 symbol in getaddrinfo for this test fails with the below error: [...] or1k-smh-linux-gnu/bin/ld: [...]/posix/tst-rfc3484.o: in function `gaiconf_reload': [...]/sysdeps/posix/getaddrinfo.c:2136: undefined reference to `__stat64' collect2: error: ld returned 1 exit status This is because __stat64 is a local symbol, the test includes the getaddrinfo directly and fails to link against the local symbol. Fix this by setting up an alias to the global stat64 symbol name like is done for other local symbol usage. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2020-12-04nsswitch: use new internal API (callers)DJ Delorie1-1/+1
Stitch new ABI and types throughout all NSS callers. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2018-03-03Fix multiple definitions of __nss_*_database (bug 22918)Andreas Schwab1-0/+1
2017-08-21Mark internal nss symbols with attribute_hidden [BZ #18822]H.J. Lu1-2/+0
Mark internal nss symbols with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. Tested on x86-64 with and without --disable-nscd. [BZ #18822] * grp/initgroups.c (__nss_group_database): Removed. (__nss_initgroups_database): Likewise. * nscd/gai.c (__nss_hosts_database): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * posix/tst-rfc3484-2.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484-3.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484.c (__nss_hosts_database): Likewise. * sysdeps/posix/getaddrinfo.c (__nss_hosts_database): Likewise. * nss/getXXent.c (INTERNAL (REENTRANT_GETNAME)): Add attribute_hidden. * nss/nsswitch.c (__nss_database_custom): Define only if USE_NSCD is defined. (__nss_configure_lookup): Use __nss_database_custom only if USE_NSCD is defined. * nss/nsswitch.h (__nss_database_custom): Declare only if USE_NSCD is defined. Add attribute_hidden. (__nss_setent): Add attribute_hidden. (__nss_endent): Likewise. (__nss_getent_r): Likewise. (__nss_getent): Likewise. (DEFINE_DATABASE): Declare __nss_##arg##_database.
2014-11-12Fix qsort_r namespace (bug 17571).Joseph Myers1-0/+1
qsort_r is defined in the same file as qsort, but is not an ISO C function, so should be a weak alias for __qsort_r. The uses in getaddrinfo should also call __qsort_r, since getaddrinfo is a POSIX function and qsort_r isn't. This patch implements this. Because nscd uses the getaddrinfo sources outside libc, as do the tst-rfc3484 tests, a #define of __qsort_r to qsort_r is added there alongside the similar defines for other libc-internal symbols used in getaddrinfo. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17571] * stdlib/msort.c (qsort_r): Rename to __qsort_r and define as weak alias of __qsort_r. (qsort): Call __qsort_r instead of qsort_r. * include/stdlib.h (qsort_r): Do not call libc_hidden_proto. (__qsort_r): Declare. Call libc_hidden_proto. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call __qsort_r instead of qsort_r. * nscd/gai.c (__qsort_r): Define to qsort_r. * posix/tst-rfc3484.c (__qsort_r): Likewise. * posix/tst-rfc3484-2.c (__qsort_r): Likewise. * posix/tst-rfc3484-3.c (__qsort_r): Likewise.
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold1-0/+1
2012-08-23Fix tst-rfc3484* build failures from USE_NSCD move to config.h.Roland McGrath1-0/+1
2011-11-01Fix tst-rfc3484 build failuresUlrich Drepper1-0/+6
2009-07-23Avoid warnings in test cases.Ulrich Drepper1-0/+2
The posix/tst-rfc3484* test cases caused warnings in newer gccs because the unused but copied sin_zero part of sockaddr_in wasn't explicitly initialized.
2008-05-15* posix/regcomp.c (optimize_utf8): Add a note on why we testUlrich Drepper1-0/+11
opr.ctx_type. (calc_first): Initialize constraint field. (duplicate_node_closure): Use it instead of special casing ANCHORS. Use search_duplicated_node to avoid loops. Fix grammar. (duplicate_node): Merge constraint field for all node types. (calc_eclosure_iter): Look at constraint field for all node types. * posix/regex_internal.c (create_cd_newstate): Don't look at create_cd_newstate. * posix/tst-rfc3484.c: Add dummy definition of _res_hconf_init. * posix/tst-rfc3484-2.c: Likewise. * posix/tst-rfc3484-3.c: Likewise.
2008-01-10* sysdeps/posix/getaddrinfo.c (sort_results): Remove service_orderUlrich Drepper1-8/+9
field. Use sockaddr_in6 for source_addr. (get_scope): Change type of parameter to sockaddr_in6. Adjust. (match_prefix): Likewise. (get_label): Likewise. (get_precedence): Likewise. (rfc3484_sort): Change to use indirect access to results array. Adjust to use of sockaddr_in6. Replace service_order test with simple index comparison. (getaddrinfo): Define order array. Initialize it. Don't initialize service_order field. Adjust qsort_t calls. Access sorted result array indirectly through order array. * posix/tst-rfc3484.c: Adjust for change of rfc3484_sort. * posix/tst-rfc3484-2.c: Likewise. * posix/tst-rfc3484-3.c: Likewise.
2007-11-20* sysdeps/posix/getaddrinfo.c (defaults_scopes, scopes): New variables.Ulrich Drepper1-0/+1
(get_scope): For IPv4 scope, use scopes table. (fini): Free scopes table if necessary. (free_scopelist): New function. (scopecmp): New function. (gaiconf_init): Also handle scopev4 entries. * posix/tst-rfc3484.c (do_test): Initialize scopes. * posix/tst-rfc3484-2.c (do_test): Likewise. * posix/gai.conf: Document scopev4 defaults. * posix/Makefile (tests): Add tst-rfc3484-3. * posix/tst-rfc3484-3.c: New file.
2007-11-14* include/ifaddrs.h: Remove in6ai_temporary.Ulrich Drepper1-2/+13
(struct in6addrinfo): Add index element. Declare __check_native. * inet/Makefile (aux): Add check_native. * sysdeps/unix/sysv/linux/check_native.c: New file. * sysdeps/unix/sysv/linux/check_pf.c: No need to recognize IFA_F_TEMPORARY. Pass back ifa_index. * sysdeps/posix/getaddrinfo.c: Remove netlink compatibility code. (rfc3484_sort): Add new parameter. Implement rule 7 correctly: call __check_native if necessary. (getaddrinfo): Fill in index field. Use qsort_r instead of qsort to sort addresses. Pass information about the results. * posix/tst-rfc3484.c: Adjust for addition of index field and change of rfc3484_sort interface. * posix/tst-rfc3484-2.c: Likewise.
2007-11-13* posix/tst-rfc3484.c: Adjust for addition of prefixlen field.Ulrich Drepper1-0/+4
* posix/tst-rfc3484-2.c: Likewise.
2007-10-14* posix/tst-rfc3484-2.c (do_test): Likewise.Ulrich Drepper1-0/+4
2007-08-26* posix/tst-rfc3484.c (__idna_to_unicode_lzlz): Initialize *OUTPUT.Ulrich Drepper1-0/+1
* posix/tst-rfc3484-2.c (__idna_to_unicode_lzlz): Likewise.
2006-05-04* sysdeps/posix/getaddrinfo.c: Implement configuration fileUlrich Drepper1-0/+12
handling. /etc/gai.conf can contain replacements for the label and precedence table. Fix byte order of default label and precedence table. * posix/gai.conf: New file. * posix/tst-rfc3484.c: Adjust for changes to getaddrinfo.c. * posix/tst-rfc3484-2.c: Likewise.
2006-04-24* posix/tst-rfc3484.c (do_test): Also initialize source_addr_flagscvs/fedora-glibc-20060425T0903Ulrich Drepper1-0/+4
field. * posix/tst-rfc3484-2.c (do_test): Likewise.
2006-04-24* posix/tst-rfc3484.c: Include <ifaddrs.h> early.Ulrich Drepper1-0/+1
* posix/tst-rfc3484-2.c: Likewise.
2006-04-20* include/ifaddrs.h: Get uint32_t definition.Ulrich Drepper1-1/+3
* posix/tst-rfc3484.c: Update fake __check_pf implementation. * posix/tst-rfc3484-2.c: Likewise.
2006-04-15* sysdeps/posix/getaddrinfo.c: Fix precedence for IP V4-to-V6Ulrich Drepper1-0/+126
mapped addresses. * posix/Makefile (tests): Add tst-rfc3484-2. * posix/tst-rfc3484-2.c: New file.
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper1-145/+0
2007-07-122.5-18.1Jakub Jelinek1-0/+145