freebsd-skq/include
Jacques Vidrine c849849d06 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
..
arpa
protocols
rpc Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
rpcsvc Argh. Forward declare some structs rather than increase include file 2003-10-26 16:35:11 +00:00
_ctype.h
a.out.h
ar.h
assert.h
bitstring.h
complex.h
cpio.h
ctype.h
db.h
dirent.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
dlfcn.h
elf-hints.h
elf.h
err.h
fmtmsg.h
fnmatch.h Now I understand what Bruce was getting at - -1 can be parsed as two 2003-12-18 10:41:39 +00:00
fstab.h
fts.h
getopt.h
glob.h
grp.h
hesiod.h
histedit.h
ieeefp.h
ifaddrs.h Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
inttypes.h
iso646.h
kenv.h
langinfo.h
libgen.h
limits.h
link.h
locale.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
Makefile Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr 2003-12-08 07:22:42 +00:00
malloc.h
memory.h
monetary.h
mpool.h
ndbm.h
netconfig.h
netdb.h style. 2003-10-24 06:53:12 +00:00
nl_types.h
nlist.h
nss.h It was reported that when using nss_ldap, getgrent(3) would behave 2004-01-09 13:43:49 +00:00
nsswitch.h
objformat.h
paths.h Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming 2004-01-04 17:17:46 +00:00
pthread_np.h
pthread.h Add the pthread_atfork() prototype. 2003-11-04 20:10:15 +00:00
pwd.h
ranlib.h
readpassphrase.h
regex.h Now I understand what Bruce was getting at - -1 can be parsed as two 2003-12-18 10:41:39 +00:00
regexp.h
resolv.h Add support for timeout: and attempts: resolver options. 2003-12-07 12:32:24 +00:00
rune.h
runetype.h
search.h
setjmp.h
sgtty.h
signal.h
stab.h
stdbool.h
stddef.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdio.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdlib.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
string.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stringlist.h
strings.h
sysexits.h
tar.h
time.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
timeconv.h
timers.h
ttyent.h
ulimit.h
unistd.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
utime.h
utmp.h
uuid.h
varargs.h
vis.h Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magic 2003-10-30 10:40:49 +00:00
wchar.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
wctype.h
wordexp.h