HardenedBSD/lib
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
..
csu/i386 Fixup the "ld.so failed" message for the case when ld.so finds undefined 1995-09-27 23:13:33 +00:00
libc Another tweak/speedup pass: 1995-10-11 21:35:08 +00:00
libcom_err
libcompat
libcrypt
libcurses
libdisk
libedit Change my parse fix from 'return argc' to 'return 0'. 1995-08-30 17:59:59 +00:00
libf2c Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
libF77 Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
libforms Removed libdialog. 1995-09-16 16:25:25 +00:00
libftp
libI77 Update to the 1995/09/20 version. Previous version was 1993/12/17. 1995-09-28 20:49:15 +00:00
libkvm
libm
libmd Back out that last change; we don't build this shared. 1995-09-06 14:34:50 +00:00
libmytinfo
libncurses
libpam/modules
libpcap
libresolv
librpc
librpcsvc
libscsi
libskey
libss
libtelnet
libterm
libtermcap
libutil
liby
msun Compress manual pages (if desired) in the obj directory rather 1995-10-02 20:02:05 +00:00
ncurses/ncurses
rpcsvc
Makefile Build secure libcrypt if available and allowed 1995-09-29 19:56:05 +00:00
Makefile.inc