freebsd-dev/lib/libc
Bill Paul 3948edc24c Another tweak/speedup pass:
- Fix buffer overflow problem once and for all: do away with the buffer
  copies to 'user' prior to calling _scancaches() and just pass a pointer
  to the buffer returned by yp_match()/yp_first()/yp_next()/whatever.
  (We turn the first ':' to a NUL first so strcmp() works, then change it
  back later. Submitted by Bill Fenner <fenner@parc.xerox.com> and
  tweaked slightly by me.

- Give _pw_breakout_yp() the 'more elegant solution' I promised way back when.
  Eliminate several copies to static buffers and replace them with just
  one copy. (The buffer returned by the NIS functions is at most
  YPMAXRECORD bytes long, so we should only need one static buffer of
  the same length (plus 2 for paranoia's sake).)

- Also in _pw_breakout_yp(): always set pw.pw_passwd to the username
  obtained via NIS regardless of what pw_fields says: usernames cannot
  be overridden so we have no choice but to use the name returned by
  NIS.

- _Again_ in _pw_breakout_yp(): before doing anything else, check that
  the first character of the NIS-returned buffer is not a '+' or '-'.
  If it is, drop the entry. (#define EXTRA_PARANOIA 1 :)

- Probe for the master.passwd.* maps once during __initdb() instead
  of doing it each time _getyppass() or _nextyppass() is called.

- Don't copy the NIS data buffers to static memory in _getyppass()
  and _nextyppass(): this is done in _pw_breakout_yp() now.

- Test against phkmalloc and phkmalloc/2 (TNG!) to make sure we're
  free()ing the yp buffers sanely.

- Put _havemaster(), _getyppass() and nextyppass() prototypes under
  #ifdef YP. (Somehow they ended up on the wrong side of the #endif.)

- Remove unused variable ___yp_only.
1995-10-11 21:35:08 +00:00
..
amd64 remove GCC support functions from libc. 1995-10-05 10:24:57 +00:00
compat-43 Remove setre*id*. 1995-04-25 10:00:04 +00:00
db Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
gen Another tweak/speedup pass: 1995-10-11 21:35:08 +00:00
gmon Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
i386 remove GCC support functions from libc. 1995-10-05 10:24:57 +00:00
locale Forget to close file 1995-08-11 08:44:31 +00:00
net Remove the CFLAGS+=-I${CURDIR}/net that I previously added. 1995-08-21 17:50:01 +00:00
nls Add /usr/local/share/nls to default search path 1995-06-17 03:02:21 +00:00
quad Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
regex Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
rpc Reviewed by: David Greenman 1995-08-02 09:14:23 +00:00
stdio Make a link-time warning for the use of gets(). 1995-10-04 18:29:01 +00:00
stdlib phkmalloc/2 1995-10-08 18:44:20 +00:00
stdtime Fix manpage to reflect current sources 1995-08-07 23:36:08 +00:00
string Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
sys Add man pages for the SYSV shm* and sem* functions. 1995-10-03 19:17:21 +00:00
xdr Confirmed to work by: rcarter@geli.com (Russell Carter) 1995-07-22 23:32:13 +00:00
yp Clear up a minor bogosity in yp_match(): we have YPMATCHCACHE turned 1995-09-02 04:16:21 +00:00
Makefile Bump shlib minor because xdr_* functions have been enabled. Do NOT 1995-08-09 06:50:52 +00:00