Commit Graph

751 Commits

Author SHA1 Message Date
dyoung 46db29bcf1 Bring getifaddrs(3) behavior in line with the documentation: the
ifa_data member of every AF_LINK struct ifaddrs points at the
corresponding struct if_data.  In ifconfig(8), do not try to suppress
duplicate AF_LINK ifaddrs by checking for a NULL ifa_data.

Don't copy out two AF_LINK struct ifaddrs for each active link-layer
address. getifaddrs(3) used to copy out one ifaddrs for the kernel's
RTM_IFINFO message, and one more for the kernel's RTM_NEWADDR message.
I suppress the first duplicate with a highly conservative change that
wastes a little bit of ifaddrs storage.  The storage is not leaked.
2009-04-27 20:10:49 +00:00
wiz 48f171ac9f Mark up NULL. New sentence, new line. Bump date for previous. 2009-04-22 07:26:52 +00:00
dyoung c378e7997c For non-AF_LINK ifaddrs, ifa_data is NULL. AFAICT, this has always been
so.  Say so in the documentation.
2009-04-21 23:27:09 +00:00
christos 59a755a40f merge libbind and bump. 2009-04-12 17:07:16 +00:00
joerg 592c0f8761 Remove reundant quote. 2009-04-11 15:32:03 +00:00
joerg 0e5f0af7e9 Fix preamble 2009-03-11 13:35:21 +00:00
joerg fa91a1ac51 Use .An for author list. 2009-03-10 23:36:10 +00:00
lukem da77f10ac5 sign-compare fix 2009-02-11 05:25:17 +00:00
lukem fc2df2f1c0 sign-compare fix 2009-02-05 23:22:39 +00:00
lukem 8bbffe062a sign-compare fix 2009-02-05 13:21:11 +00:00
lukem 8a09e86085 sign-compare fix 2009-01-30 23:35:35 +00:00
tls 8d33a6da32 Cause getaddrinfo() without socktype specification to work correctly for
numeric addresses.  The documentation appears to say this works, and some
other systems support it -- more importantly, why should it _not_ work?  If
it does not, getaddrinfo() cannot be used as a general-purpose textual to
binary address conversion utility function; yet it is the only such function
we have in the system, since inet_pton() requires a priori knowledge of the
address family.

This change also causes getaddrinfo() with NULL hint (expressly documented
as working) to work properly for numeric addresses.
2009-01-23 00:48:57 +00:00
gmcgarry 77023558e8 Changee __attribute(__weak__) to __weak_reference(). Produces same object code
and matches lib/csu/common_elf/common.h.  Fixes linkage with PCC.
2008-08-17 10:51:19 +00:00
christos 3873655b27 updates from bind-9-5-0 2008-06-21 20:41:48 +00:00
lukem edf03256a8 Fix possible memory leak in error path.
Part of PR 38677.
2008-05-18 22:36:15 +00:00
lukem 2713f76747 Convert getnetbyname(3) and getnetbyaddr(3) to the more "standard"
nsdispatch() backend method API.
2008-05-08 13:01:42 +00:00
lukem d8aac84366 Fix a misuse of an automatic as a static that was exposed by the previous. 2008-05-08 12:26:55 +00:00
lukem 6e5e2748b3 Fix DNS getnetbyname(), which has been broken for at least 5.5 years
(if not longer).
2008-05-08 05:06:18 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
lukem e11ffebb07 Document the callback API used by "standard" functions.
NOTE: some of these will be changing in the future to be more
consistent with the technique used in the group & passwd backends.
I'm just documenting the existing behaviour.

Be more consistent when using certain terms.
Rename some variables to reduce confusion.
2008-04-19 08:24:45 +00:00
lukem e39aac16df Add a missing const. 2008-04-19 07:56:34 +00:00
lukem a699245e9a The ns_mtab.mdata is passed to the ns_mtab.method as the cbdata argument. 2008-04-07 13:25:42 +00:00
lukem 7ce7cf535a Improve description of the arguments and return values of
various methods & callbacks.
Improve markup.
2008-04-07 13:20:44 +00:00
abs e26de9edf5 Adjust "The getpeereid() function appeared in NetBSD 4.0" to a more
correct NetBSD 5.0.
2008-01-29 13:55:27 +00:00
christos 5f01dfbd0d PR/37708: A.Leo.: getservbyname, segetaddrinfo sefgfaults when user has no
rights for reading ``/etc/services''
2008-01-06 16:34:18 +00:00
dyoung eac83fd0cb Use __arraycount(). 2007-12-06 22:51:57 +00:00
he fd961c4429 Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().

Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.

Document the LOCAL_PEEREID socket option in unix(4).

Based on contribution by Arne H. Juul, minor modifications by myself.
2007-08-09 15:23:01 +00:00
christos 7b1793900f make this compile without INET6 (Scott Ellis) 2007-06-29 15:53:21 +00:00
christos 2f53e821af Since we are going to be looking for ports many times, use a centralized
servent data structure and pass the stayopen hint.
2007-06-23 17:32:08 +00:00
christos f8178c49fa use syslog_r, from OpenBSD 2007-05-10 18:44:24 +00:00
ghen 225c5452c3 Resolve conflicts. 2007-03-30 20:23:03 +00:00
christos efa6baa28d return NULL instead of core-dumping when we could not open the services file/db 2007-03-21 02:35:39 +00:00
christos efba316dcc Appropriate versions are not supplied by bind anymore. 2007-01-27 22:27:35 +00:00
christos d73eb73dc8 merge in resolver portion of bind-9.4.0-rc2 2007-01-27 22:26:43 +00:00
ws 0ff81292cd Don't leak file descriptors. 2007-01-03 11:46:22 +00:00
wiz ee39be7187 Add missing article. 2006-12-23 07:42:30 +00:00
elad 020be40ef1 strncpy -> strlcpy. from David Holland. 2006-11-25 23:09:11 +00:00
reed f8ee2d04c1 Document AI_NUMERICSERV.
(When manpage was rewritten some docs were lost.)
2006-11-24 16:56:18 +00:00
christos 1d83cc5b6c nuke perror. 2006-11-03 20:21:16 +00:00
christos ce2c90c7c1 fix incomplete initializers 2006-10-15 16:14:46 +00:00
martin a5cb9c8ff7 PR lib/34801 from David A. Holland: "static" comes first in declaration. 2006-10-15 10:55:01 +00:00
christos 48314d6d96 memset the whole struct addrinfo, instead of trying to figure out if we
have a pad member or not.
2006-10-14 21:45:29 +00:00
apb bed8b72282 Clarify that gethostbyname and gethostbyname2 can deal with
string representations of numeric addresses.  PR 28667
2006-10-07 21:30:39 +00:00
tsutsui 6a8419e3ee Change type of `net' variable passed via va_list in
_{files,dns,yp}_getenetbyaddr() functions from unsigned long to uint32_t.
In rev 1.29, getnetbyaddr(3) was changed to take uint32_t `net' argument
and also passisng uint32_t `net' to nsdispatch(3) varargs, but
these callback functions were not changed accordingly.

Patch was provided by christos, and this fixes amd(8) coredumps on alpha
when /etc/nsswitch.conf has more than one sources for netgroups.
2006-09-18 17:15:39 +00:00
christos fd58d46323 when re-opening the file only set SV_FIRST, don't clear accidentally SV_DB
because it leads to core-dumps.
2006-09-14 19:58:48 +00:00
matt acf2f4a0d7 Remove the XNS man pages. 2006-08-26 16:11:05 +00:00
matt 95ff9c00a4 Move ns_addr and ns_ntoa to compat libc. Add a stripped version of
<netns/ns.h> which only include struct ns_addr and the ns_addr and ns_ntoa
function prototypes.
2006-08-26 16:07:01 +00:00
christos 1463de6acb use the re-entrant version of getservbyport. 2006-08-24 15:39:11 +00:00