about summary refs log tree commit diff
path: root/sysdeps/posix
Commit message (Collapse)AuthorAgeFilesLines
* Fix decoding of canonical name in getaddrinfo.Ulrich Drepper2011-01-191-0/+1
|
* Relax requirement on close in child created by posix_spawn.Ulrich Drepper2011-01-131-3/+17
|
* Add self-contained test for NSS.Ulrich Drepper2010-08-111-1/+2
| | | | | While at it fix interaction between __nss_configure_lookup and nscd. Otherwise the test fails if nscd is runnung.
* Handle POSIX-compliant errno value of unlink in remove.Ulrich Drepper2010-04-041-2/+8
|
* Fix one case of last checkin.Ulrich Drepper2010-03-261-0/+1
| | | | If the v4 lookup failed but v6 succeeded we treat this as a success.
* Don't abort immediately on successful lookup in getaddrinfo.Ulrich Drepper2010-03-261-10/+10
| | | | | | | When not using gethostbyname4 methods we immediately aborted the loop over the nss modules on the first successful lookup. While this is almost always what is wanted the nsswitch.conf file allows to select something different.
* Fix spurious UNAVAIL status is getaddrinfoAndreas Schwab2010-03-261-0/+1
|
* Fix typo in cuseridAndreas Schwab2010-03-251-1/+1
|
* calls to cuserid() can result in buffer overruns and/or overflowsJonathan Geisler2010-03-241-2/+3
|
* Fix a few error cases in *name4_r lookup handling.Ulrich Drepper2009-12-101-7/+2
|
* Implement mkstemps and mkstemps64.Ulrich Drepper2009-10-301-7/+7
|
* Handle missing NSS modules and those without callbacks.Ulrich Drepper2009-07-251-0/+2
| | | | | getaddrinfo didn't update the status variable in that round of the loop if no callback was used.
* Preserve message printed before abort.Ulrich Drepper2009-06-151-1/+16
| | | | | | | The terminal output etc is not visible in a core file. The new libc-internal variable __abort_msg will point to a string with the message which has been printed before the abort in case abort is called from inside libc. BZ #10217
* * sysdeps/unix/sysv/linux/preadv.c: The kernel API changed. Adjust.Ulrich Drepper2009-04-232-24/+12
| | | | | | | | | | | | | | | | | | * sysdeps/unix/sysv/linux/pwritev.c: Likewise. 2009-04-23 Jakub Jelinek <jakub@redhat.com> * sysdeps/posix/pwritev.c (PWRITEV): Fix up comment. Copy data from vector to temporary buffer and call PWRITEV after it instead of vice versa. * sysdeps/posix/preadv.c: Fix up comment. * misc/preadv.c: Likewise. * misc/preadv64.c: Likewise. * misc/pwritev.c: Likewise. * misc/pwritev64.c: Likewise. * misc/sys/uio.h (preadv, pwritev, preadv64, pwritev64): Likewise. 2009-04-23 Ulrich Drepper <drepper@redhat.com>
* * sysdeps/posix/preadv.c: Reading of zero bytes is no error.Ulrich Drepper2009-04-172-2/+2
| | | | | * sysdeps/posix/readv.c: Likewise. Reported by Markus Armbruster <armbru@redhat.com>.
* * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64.Ulrich Drepper2009-04-034-0/+234
| | | | | | | | | | | | | | | | | | | | | | * misc/Versions: Export preadv, preadv64, pwritev, pwritev64 for GLIBC_2.10. * misc/sys/uio.h: Declare preadv, preadv64, pwritev, pwritev64. * sysdeps/unix/sysv/linux/kernel-features.h: Add entries for preadv and pwritev. * misc/preadv.c: New file. * misc/preadv64.c: New file. * misc/pwritev.c: New file. * misc/pwritev64.c: New file. * sysdeps/posx/preadv.c: New file. * sysdeps/posx/preadv64.c: New file. * sysdeps/posx/pwritev.c: New file. * sysdeps/posx/pwritev64.c: New file. * sysdeps/unix/sysv/linux/preadv.c: New file. * sysdeps/unix/sysv/linux/preadv64.c: New file. * sysdeps/unix/sysv/linux/pwritev.c: New file. * sysdeps/unix/sysv/linux/pwritev64.c: New file. * sysdeps/unix/sysv/linux/wordsize-64/preadv64.c: New file. * sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c: New file.
* * sysdeps/unix/sysv/linux/kernel-features.h: DefineUlrich Drepper2009-04-032-45/+37
| | | | | | | | | | | | | __ASSUME_COMPLETE_READV_WRITEV. * sysdeps/unix/sysv/linux/readv.c: No need for userlevel fallback with modern kernels. * sysdeps/unix/sysv/linux/writev.c: Likewise. * sysdeps/posix/readv.c: Since read is a cancellation point we have to free a possible malloced buffer in case of cancellation. * sysdeps/posix/writev.c: Likewise for write. c2009-04-01 Ulrich Drepper <drepper@redhat.com>
* ..Ulrich Drepper2009-02-251-0/+10
| | | | | | | | | | 2009-02-24 Ulrich Drepper <drepper@redhat.com> * bits/confname.h: Define _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS. * sysdeps/posix/sysconf.c (__sysconf): Handle _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS.
* [BZ #7095]Ulrich Drepper2009-02-071-2/+29
| | | | | | | | | | | | | | | | | | 2009-02-06 Ulrich Drepper <drepper@redhat.com> [BZ #7095] * bits/confname.h: Add SUSv7 macros for getconf environments. * bits/environments.h: Likewise. * sysdeps/unix/sysv/linux/i386/bits/environments.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/environments.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/environments.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/environments.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/environments.h: Likewise. * posix/confstr.c: Handle SUSv5 and SUSv7 environments. * posix/getconf.c: Likewise. * posix/sysconf.c: Likewise. * sysdeps/posix/sysconf.c: Likewise. * posix/Makefile (getconf.speclist): Also collect SUSv5 and SUSv7 environments.
* * sysdeps/posix/getaddrinfo.c (gaih_inet): When theUlrich Drepper2008-12-291-0/+2
| | | | gethostbyname4_r function call succeeded, just leave the loop.
* * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname3_r): RecognizeUlrich Drepper2008-12-031-0/+2
| | | | | | | | | ESRCH return value. (_nss_dns_gethostbyname4_r): Likewise. * resolv/res_init.c (__res_vinit): Initialize nscount to zero. * sysdeps/posix/getaddrinfo.c (gaih_inet): In case we use gethostbyname4_r, we don't have a separate IPv6 status, so copy the no_data variable.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): Only restrict searchUlrich Drepper2008-11-271-7/+1
| | | | to IPv4 or IPv6 if an interface has been found.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): If the system hasUlrich Drepper2008-11-271-0/+6
| | | | neither IPv4 nor IPv6 addresses defined, don't do anything.
* * sysdeps/posix/clock_getres.c (hp_timing_getres): Remove inlineUlrich Drepper2008-08-021-2/+2
| | | | to prevent warning.
* * sysdeps/posix/getaddrinfo.c (gaih_inet): Raise size of initialUlrich Drepper2008-07-301-1/+1
| | | | buffer passed to NSS functions.
* * sysdeps/posix/getaddrinfo.c: Move _res_hconf_init call to aUlrich Drepper2008-06-131-21/+9
| | | | better place so it is not called when nscd is used.
* * sysdeps/posix/getaddrinfo.c (gaih_inet): If nscd reports noUlrich Drepper2008-05-171-1/+4
| | | | entry is available, believe it.
* * sysdeps/posix/getaddrinfo.c (gaih_inet): After gethostbyname4_rUlrich Drepper2008-05-161-2/+3
| | | | lookup, don't assign canon unconditionally.
* (match_prefix): Don't treat IPv4 loopback address special whenUlrich Drepper2008-05-141-11/+5
| | | | converting to v4 mapped addressed.
* * sysdeps/posix/getaddrinfo.c (get_scope): Loopback addresses haveUlrich Drepper2008-05-141-1/+4
| | | | to be treated like link-local addresses.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): Add _res_hconf_initUlrich Drepper2008-05-141-0/+5
| | | | if necessary.
* * sysdeps/posix/getaddrinfo.c: Implement handling of DCCP, UDPlite,Ulrich Drepper2008-05-141-0/+4
| | | | and SCTP.
* * sysdeps/posix/getaddrinfo.c: Implement handling of DCCP andUlrich Drepper2008-05-141-17/+25
| | | | | | | | | | UDPlite. * nss/getent.c (ahosts_keys_int): Handle all known socket types. * inet/netinet/in.h (IPPIPPROTO_DCCP, IPPROTO_UDPLITE): Define. * sysdeps/unix/sysv/linux/bits/socket.h (SOCK_DCCP): Define.
* * include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsendUlrich Drepper2008-05-101-73/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prototypes. * include/arpa/nameser_compat.h: Define T_UNSPEC. * nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r. (libnss_nisplus): Export _nss_nisplus_gethostbyname4_r. * nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_nis_gethostbyname4_r): New function. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Change to also handle af==AF_UNSPEC. (get_tablename): New function. Use it to avoid duplication. (_nss_nisplus_gethostbyname4_r): New function. * nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is available. * nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r. * nss/nss.h: Define struct gaih_addrtuple. * nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_files_gethostbyname4_r): New function. * resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r. * resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery calls. * resolv/res_query.c (__libc_res_nquery): Take two additional parameters for second answer buffer. Handle type=T_UNSPEC to mean look up IPv4 and IPv6. Change all callers. * resolv/res_send.c (__libc_res_nsend): Take five aditional parameters for an additional query and answer buffer. Pass to send_vc and send_dg. (send_vc): Send possibly two requests and receive two answers. (send_dg): Likewise. * resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and __libc_res_nquery. (_nss_dns_gethostbyname4_r): New function. (gaih_getanswer_slice): Likewise. (gaih_getanswer): Likewise. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust __libc_res_nquery call. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise. (_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call. * sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is available.
* [BZ #5939]Ulrich Drepper2008-03-301-1/+1
| | | | * sysdeps/posix/tempname.c (__gen_tempname): Correct flag selection.
* * posix/gai.conf: Fix comment for scope nullbits.Ulrich Drepper2008-03-261-0/+1
| | | | | * sysdeps/posix/getaddrinfo.c (gaiconf_init): If /bits is not present, default to 128 bits for v4 mapped addresses.
* Remove useless "if" before "free".Ulrich Drepper2008-03-191-2/+1
|
* * sysdeps/posix/getaddrinfo.c (default_labels): Adjust for changeUlrich Drepper2008-01-161-52/+52
| | | | | | | of names of in in6_addr. (default_precedence): Likewise. * sysdeps/unix/sysv/linux/cmsg_nxthdr.c: Include <stddef.h> for NULL definition.
* * sysdeps/posix/getaddrinfo.c (rfc3484_sort): Store result ofUlrich Drepper2008-01-101-12/+39
| | | | native interface lookup in all the relevant places.
* * sysdeps/posix/getaddrinfo.c (sort_results): Remove service_orderUlrich Drepper2008-01-101-37/+37
| | | | | | | | | | | | | | | | | 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.
* * sysdeps/posix/getaddrinfo.c (defaults_scopes, scopes): New variables.Ulrich Drepper2007-11-201-13/+201
| | | | | | | | | | | | | (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.
* * sysdeps/posix/getaddrinfo.c (default_labels): Describe entry forUlrich Drepper2007-11-191-0/+1
| | | | Teredo tunnels.
* * include/ifaddrs.h: Remove in6ai_temporary.Ulrich Drepper2007-11-141-63/+46
| | | | | | | | | | | | | | | | | (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.
* * include/ifaddrs.c (struct in6addrinfo): Add prefixlen field.Ulrich Drepper2007-11-121-74/+91
| | | | | | | | | | | * sysdeps/unix/sysv/linux/check_pf.c (make_request): Always return list of interfaces. Also store prefix length. * sysdeps/posix/getaddrinfo.c (sort_result): Add prefixlen element. (rfc3484_sort): In rule 9, for IPv4 addresses count only matching prefix if source and destination address are in the same subnet. (getaddrinfo): Always call __check_pf. Fill in prefixlen field. Always look for matching record in in6ai list. Correct source_addr_len value for IPv6->IPv4 converted records.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): When sorting addressesUlrich Drepper2007-10-171-6/+21
| | | | | and admin selects to be able to replace the gai.conf file, lock data structures around the qsort call.
* * sysdeps/posix/getaddrinfo.c (struct sort_result): Add cvs/fedora-glibc-20071014T1847Ulrich Drepper2007-10-141-2/+7
| | | | | | | service_order. (rfc3484_sort): Make sure that even of qsort doesn't support stable sorting it is stable by comparing service_order. (getaddrinfo): Initialize service_order.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): Use Jakub Jelinek2007-09-241-1/+1
| | | | | | | | close_not_cancel_no_status instead of close. 2007-09-24 Jakub Jelinek <jakub@redhat.com> * sysdeps/posix/getaddrinfo.c (getaddrinfo): Use close_not_cancel_no_status instead of close.
* * sysdeps/posix/getaddrinfo.c (getaddrinfo): Avoid unnecessaryUlrich Drepper2007-09-191-6/+41
| | | | open/close when determining source addresses.
* * nscd/connections.c: Use O_CLOEXEC is possible. Use mkostempUlrich Drepper2007-08-111-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | instead of mkstemp. * misc/Makefile (routines): Add mkostemp and mkostemp64. * misc/Versions: Export mkostemp and mkostemp64 for GLIBC_2.7. * misc/mkostemp.c: New file. * misc/mkostemp64.c: New file. * stdlib/stdlib.h: Declare the new functions. * sysdeps/posix/tempname.c: Add new parameter which is added to the flags for open. Remove __GT_BIGFILE handling. * stdio-common/tempname.c: Likewise. * include/stdio.h: Adjust __gen_tempname prototype. Renumber __GT_* constants. * libio/oldtmpfile.c: Adjust for __gen_tempname interface change. * misc/mkdtemp.c: Likewise. * misc/mkstemp.c: Likewise. * misc/mkstemp64.c: Likewise. * misc/mktemp.c: Likewise. * stdio-common/tempnam.c: Likewise. * stdio-common/tmpfile.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/tmpnam.c: Likewise. * stdio-common/tmpnam_r.c: Likewise.
* * sysdeps/posix/posix_fallocate64.c: UndefineUlrich Drepper2007-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | __posix_fallocate64_l64 before alias handling. * sysdeps/unix/sysv/linux/posix_fallocate.c: New file. * sysdeps/unix/sysv/linux/posix_fallocate64.c: New file. * sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c: New file. * sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate64.c: New file. * io/tst-posix_fallocate.c: Include <fcntl.h>. 2007-07-23 Jakub Jelinek <jakub@redhat.com> * locale/programs/ld-collate.c (atwc): New variable. (add_to_tablewc): New toplevel function, moved from collate_output. (collate_output): Remove add_to_tablewc nested function. * iconv/iconvconfig.c (hash_table, hash_size): New toplevel vars. (name_insert): New function. (write_output): Remove hash_table and hash_size vars and name_insert nested function.