performance regression between 2.0 and 3.0. The passwd compat method was
incorrectly querying the NIS server with yp_first()/yp_next() rather than
using yp_match() with the correct key.
Return 0 "entry not found" and errno for other failures.
("entry not found" still sets *result to NULL).
Various backends:
don't set the retval to errno (or modify errno) for NS_NOTFOUND.
Per discussion with Klaus Klein.
or PASSWD_BYUID(), otherwise state.maptype won't be correct and the wrong
map may be selected (e.g., "passwd.by*" instead of "master.passwd.by*").
Set _PASSWORD_NOWARN in flags to __pw_scan(), so libc won't display parse
errors to stderr. (This was the behaviour before my recent rototill.)
Fixes PR 27168 from Markus W Kilbinger.
methods use va_list in a manner that is directly related to the public API.
This makes it much easier to write dynamic nsswitch backends for getpwent(3).
Per my proposal on tech-userlevel.
Implement getpwgid_r() and getpwnam_r() APIs per the POSIX 1003.1, 2004 Ed.
These aren't fully reentrant or threadsafe yet, because the compat stuff
currently uses non-reentrant data sources (getnetgrent(3), getpwent(3)),
and there is probably some locking to be improved in the backends.
This will be fixed in the near future.
We also need to add _SC_GETPW_R_SIZE_MAX to sysconf(3).
Fix the compat `+' prototype override so getpwnam(3) and getpwuid(3) DTRT.
Improve the description of pw_class and pw_gecos.
removing the advertising clause. Diffs provided in PR 22410 by Joel
Baker, confirmed to the board by Jason Downs.
With additional thanks to Jason Thorpe.
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.
the first two items result in the addition of code similar to the
following in various functions:
_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
than returning NS_UNAVAIL. this means that a -ve uid entry in hesiod
doesn't stop getpwent() in its tracks. it also brings it in line with
how nis_getpw() works as well in this situation.
problem tracked down (with much pain & suffereing) by simonb.
XXX: we currently have no support for -ve uids, and this is painful in
XXX: hetrogenous environment... (this -ve check is enforced in __pwscan())
source has been exhausted. this allows getpwent() across multiple
sources (e.g, ``passwd: files nis'') to work correctly. the flags are
reset in setpassent()/endpwent().
this fixes a bug noted in [lib/7449] by thorpej, and tracked down to
getpwent() as being the culprit by simonb.
isn't a `+' token in the files database.
(this bug probably crept in when a merge to current occurred)
* ensure that the _bad_getpw callbacks in __getpwcompat have an
argument for error reporting.