freebsd-skq/lib/libc/net
nectar 9b32167d5f It was reported that when using nss_ldap, getgrent(3) would behave
incorrectly when encountering `large' groups (many members and/or many
long member names).  The reporter tracked this down to the glibc NSS
module compatibility code (nss_compat.c): it would prematurely record
that a NSS module was finished iterating through its database in some
cases.

Two aspects are corrected:

1. nss_compat.c recorded that a NSS module was finished iterating
   whenever the module reported something other than SUCCESS.  The
   correct logic is to continue iteration when the module reports
   either SUCCESS or RETURN.  The __nss_compat_getgrent_r and
   __nss_compat_getpwent_r routines are updated to reflect this.

2. An internal helper macro __nss_compat_result is used to map glibc
   NSS status codes to BSD NSS status codes (e.g. NSS_STATUS_SUCCESS ->
   NS_SUCCESS).  It provided the obvious mapping.

   When a NSS routine is called with a too-small buffer, the
   convention in the BSD NSS code is to report RETURN.  (This is used
   to implement reentrant APIs such as getpwnam_r(3).)  However, the
   convention in glibc for this case is to set errno = ERANGE and
   overload TRYAGAIN.  __nss_compat_result is updated to handle this
   case.

PR:		bin/60287
Reported by:	Lachlan O'Dea <odela01@ca.com>
2004-01-09 13:43:49 +00:00
..
addr2ascii.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
addr2ascii.c
ascii2addr.c
base64.c
byteorder.3
ether_addr.c
ethers.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
getaddrinfo.3 EAI_ADDRFAMILY and EAI_NODATA was deprecated in RFC3493 2003-10-23 13:55:36 +00:00
getaddrinfo.c add destination address selection described in RFC3484. 2003-10-30 17:36:53 +00:00
gethostbydns.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
gethostbyht.c
gethostbyname.3 .Xr -> .Lb for librairy. There is no manual page corresponding to .Xr. 2003-06-08 10:07:14 +00:00
gethostbynis.c Use in_addr_t for the right size of an IPv4 address, and copy into 2003-01-05 14:05:24 +00:00
gethostnamadr.c Remove bogus non-reentrant "temporary" implementation of gethostbyaddr_r() 2003-06-19 07:57:11 +00:00
getifaddrs.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
getifaddrs.c sysctl(NET_RT_IFLIST) up to several (currently 5) times. 2002-07-25 08:08:30 +00:00
getifmaddrs.3 Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
getifmaddrs.c Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
getipnodebyname.3 mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
getnameinfo.3 stop use of NI_WITHSCOPEID. it was deprecated. 2003-10-21 20:11:47 +00:00
getnameinfo.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
getnetbydns.c Allocate 64K recieve buffer for DNS responses. 2002-10-03 17:25:33 +00:00
getnetbyht.c
getnetbynis.c
getnetent.3 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
getnetnamadr.c Catch up with nsdispatch.c: nsdispatch(3) is now `hidden' by 2003-04-24 18:05:48 +00:00
getproto.c
getprotoent.3
getprotoent.c
getprotoname.c
getservbyname.c
getservbyport.c
getservent.3
getservent.c Eliminate 19 warnings in libc (at level WARNS=2) of the 2003-02-27 13:40:01 +00:00
herror.c
hesiod.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
hesiod.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
if_indextoname.3 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
if_indextoname.c Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex() 2002-07-15 19:58:56 +00:00
if_nameindex.c Use BSDi derived if_nametoindex(), if_indextoname(), if_nameindex() 2002-07-15 19:58:56 +00:00
if_nametoindex.c Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
inet6_opt_init.3 Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542 2003-10-24 18:26:30 +00:00
inet6_option_space.3 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
inet6_rth_space.3 Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542 2003-10-24 18:26:30 +00:00
inet6_rthdr_space.3 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
inet_addr.c
inet_lnaof.c
inet_makeaddr.c
inet_net_ntop.c
inet_net_pton.c From OpenBSD: 2003-09-15 23:38:06 +00:00
inet_net.3 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
inet_neta.c Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
inet_netof.c
inet_network.c
inet_ntoa.c
inet_ntop.c Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
inet_pton.c Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
inet.3 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
ip6opt.c u_int8_t cannot carry a number greater than 255. 2003-11-14 18:07:50 +00:00
linkaddr.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
linkaddr.c
Makefile.inc Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
map_v4v6.c
name6.c Replace use of a spinlock with a mutex. 2003-05-04 22:36:46 +00:00
ns_name.c Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
ns_netint.c
ns_parse.c
ns_print.c
ns_ttl.c Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
nsap_addr.c
nsdispatch.3 Assorted mdoc(7) fixes. 2003-05-22 13:02:28 +00:00
nsdispatch.c Don't complain about missing NSS methods when built statically. It is 2003-04-24 19:57:31 +00:00
nslexer.l = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
nsparser.y = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
nss_backends.h = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
nss_compat.c It was reported that when using nss_ldap, getgrent(3) would behave 2004-01-09 13:43:49 +00:00
rcmd.3 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
rcmd.c Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
rcmdsh.3 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
rcmdsh.c Eliminate 19 warnings in libc (at level WARNS=2) of the 2003-02-27 13:40:01 +00:00
recv.c
res_comp.c
res_config.h
res_data.c
res_debug.c Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
res_init.c Add support for timeout: and attempts: resolver options. 2003-12-07 12:32:24 +00:00
res_mkquery.c Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value. 2002-09-14 17:28:40 +00:00
res_mkupdate.c Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
res_query.c Restore vendor ID. 2003-03-03 01:12:24 +00:00
res_send.c Work around a `warning: zero-length printf format string'. 2004-01-06 18:45:13 +00:00
res_update.c Check for truncation in calls to res_send/res_query/res_search. 2002-09-15 16:51:09 +00:00
resolver.3 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
rthdr.c Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542 2003-10-24 18:26:30 +00:00
send.c
sockatmark.3 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
sockatmark.c Add an implementation of the POSIX.1 sockatmark(3). 2002-12-13 22:22:55 +00:00
vars.c