Commit Graph

490 Commits

Author SHA1 Message Date
Jeff Law 115411772b [BZ #11438]
* sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918
        * addresses
        to global scope.
        * posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16
        addresses are in the same scope as 192.0.2/24.
        * posix/gai.conf: Document new scope table defaults.
2012-09-28 10:15:05 -06:00
Jeff Law 8479f23aa1 * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
if the family is PF_UNSPEC.
2012-08-22 11:41:40 -06:00
Roland McGrath 7c6f9d53c1 Move some things from sysdeps/unix to sysdeps/posix. 2012-08-17 13:52:32 -07:00
Roland McGrath fbc723bb37 Fix typo in last change. 2012-08-17 11:49:00 -07:00
Roland McGrath a084405777 Fix getaddrinfo for [!_STATBUF_ST_NSEC] case. 2012-08-17 11:47:06 -07:00
Roland McGrath a3f95dcc57 Add casts to suppress warnings in system.c under [!_LIBC_REENTRANT]. 2012-08-15 10:08:32 -07:00
Roland McGrath a2433aac7e Add a missing #include. 2012-08-08 10:39:28 -07:00
Roland McGrath a281decc87 Move common dirent implementation from sysdeps/unix to sysdeps/posix. 2012-08-07 14:47:34 -07:00
Roland McGrath bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Florian Weimer 84b3fd8407 Rename __secure_getenv to secure_getenv 2012-07-25 19:46:22 +02:00
Jeroen van Bemmel 7b6e99be77 Avoid duplicate DNS requests if answer is longer than a implementation
limit

        [BZ #14307]
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Increase the size of
        the temporary buffer used to invoke __gethostbyname2_r,
        __gethostbyaddr_r and gethostbyname4_r to make room for struct
        host_data / struct gaih_addrtuple.
        * resolv/nss_dns/dns-host.c (global scope): Move definition of
        implementation constants MAX_NR_ALIASES and MAX_NR_ADDRS to
        header file nss/nsswitch.h.
        * nss/nsswitch.h (global scope): Add definition of implementation
        constants MAX_NR_ALIASES and MAX_NR_ADDRS (moved from
        resolv/nss_dns/dns-host.c).
2012-07-12 11:31:48 +05:30
Roland McGrath d6c33fda03 Switch gettimeofday from INTUSE to libc_hidden_proto. 2012-05-24 13:12:34 -07:00
Thomas Schwinge be971a2b1c Hurd: libc_once_get 2012-05-10 15:57:24 -07:00
Thomas Schwinge 37233df9d1 Hurd: #include <kernel-features.h> 2012-05-10 15:57:24 -07:00
Joseph Myers 4ad451e281 Move sysdeps/unix/sysv/gethostname.c to sysdeps/posix/. 2012-04-23 18:53:47 +00:00
Andreas Schwab 12e5c3b9e5 Add missing headers 2012-02-27 20:27:41 +01:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Joseph Myers c8a89e7dd5 Remove miscellaneous __STDC__ conditionals. 2012-01-30 21:20:32 +00:00
Ulrich Drepper 312be3f9f5 Clean up internal fopen uses
No need to ever not use c and e.
2011-11-15 04:24:42 -05:00
Ulrich Drepper 3a2c02424d Cache network interface information
Whenever getaddrinfo needed network interface information it used the
netlink interface to read the information every single time.  The
problem is that this information can change at any time.

The patch implements monitoring of the network interfaces through
nscd.  If no change is detected the previously read information can
be reused (which is the norm).  This timestamp information is also
made available to other processes using the shared memory segment
between nscd and those processes.
2011-10-31 01:51:16 -04:00
Roland McGrath ecb1482ffd Clean up disabling of script_execute 2011-09-19 12:50:25 -07:00
Ulrich Drepper d96de9634a Try shell in posix_spawn* only in compat mode 2011-09-05 20:24:50 -04:00
Andreas Schwab 2e96f1c73b Fix encoding name for IDN in getaddrinfo 2011-08-04 15:42:10 -04:00
Andreas Schwab 89f654c57b Make sure RES_USE_INET6 is always restored 2011-06-30 06:33:32 -04:00
Ulrich Drepper fa3fc0fe5f Avoid __check_pf calls in getaddrinfo unless really needed 2011-06-22 15:00:54 -04:00
Andreas Schwab e12df166d3 Fix Ipv4&IPv6 lookup in getaddrinfo
Problem introduced in the last patch.
2011-06-22 14:35:49 -04:00
Ulrich Drepper c0244a9ded Fix IPv6-only lookups through getaddrinfo
A recent patch introduced a problem where IPv6 lookups happily returned
IPv4 addresses.
2011-06-21 17:03:38 -04:00
Ulrich Drepper c5e3c2ae59 Minor optimization of getaddrinfo after recent patch 2011-06-21 13:06:42 -04:00
Ulrich Drepper 3154bfb8c7 Fix memory leak in getaddrinfo 2011-06-13 08:31:50 -04:00
Ulrich Drepper 7ae22829af Restore _res correctly
getaddrinfo works around the resolver functionality to avoid automatic
IPv6 lookups.  The restoring didn't allow for the resolver to set
additional bits in _res.
2011-05-29 23:49:49 -04:00
Ulrich Drepper 34a9094f49 Don't unconditionally use alloca in gaih_inet 2011-05-20 23:46:03 -04:00
Ulrich Drepper f8a3b5bf8f Use mmap for allocation of buffers used for __abort_msg 2011-05-15 00:34:48 -04:00
Ulrich Drepper f574184a0e Fix sched_setscheduler call in spawn implementation 2011-05-11 23:58:02 -04:00
Ulrich Drepper 6fb2dde3f1 Make complete getcwd work in rtld 2011-05-08 14:53:20 -04:00
Ulrich Drepper 7fb90fb89b Fix Linux getcwd for long paths
The getcwd syscall (so far?) can only handle path up to one page
in size.  There is no limit about directory hierarchy depth, though,
and the POSIX getcwd is supposed to handle this.  In that case fall
back to the generic getcwd.

Additionally, optimize the generic getcwd to use openat when possible
to change the asymptotic performance from O(N^2) to O(n).
2011-05-08 08:37:19 -04:00
Maciej Babinski 0b592a30f5 getaddrinfo(AF_INET6) does not return scope_id info provided by NSS modules 2011-05-02 21:11:17 -04:00
Ulrich Drepper 86e9235918 Fix decoding of canonical name in getaddrinfo. 2011-01-19 15:50:05 -05:00
Ulrich Drepper cfa28e560e Relax requirement on close in child created by posix_spawn. 2011-01-13 13:27:46 -05:00
Ulrich Drepper c3e2f19bb9 Add self-contained test for NSS.
While at it fix interaction between __nss_configure_lookup and nscd.
Otherwise the test fails if nscd is runnung.
2010-08-11 07:25:02 -07:00
Ulrich Drepper cb652f30b0 Handle POSIX-compliant errno value of unlink in remove. 2010-04-04 02:08:37 -07:00
Ulrich Drepper 07f9ca32a9 Fix one case of last checkin.
If the v4 lookup failed but v6 succeeded we treat this as a success.
2010-03-26 05:52:39 -07:00
Ulrich Drepper 7c9302908e Don't abort immediately on successful lookup in getaddrinfo.
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.
2010-03-26 05:40:27 -07:00
Andreas Schwab c3dfadb87e Fix spurious UNAVAIL status is getaddrinfo 2010-03-26 05:35:50 -07:00
Andreas Schwab 34b514dff6 Fix typo in cuserid 2010-03-25 11:36:02 +01:00
Jonathan Geisler fd8ccb0427 calls to cuserid() can result in buffer overruns and/or overflows 2010-03-24 16:02:15 -07:00
Ulrich Drepper a682a1bf55 Fix a few error cases in *name4_r lookup handling. 2009-12-10 15:44:26 -08:00
Ulrich Drepper 7f3146e789 Implement mkstemps and mkstemps64. 2009-10-30 00:11:07 -07:00
Ulrich Drepper 657317537c Handle missing NSS modules and those without callbacks.
getaddrinfo didn't update the status variable in that round of the
loop if no callback was used.
2009-07-25 12:29:04 -07:00
Ulrich Drepper 48dcd0ba84 Preserve message printed before abort.
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
2009-06-15 16:17:09 -07:00
Ulrich Drepper 7f8a28efb5 * sysdeps/unix/sysv/linux/preadv.c: The kernel API changed. Adjust.
* 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>
2009-04-23 22:52:24 +00:00