Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jun 1995 04:23:26 -0700
From:      David Greenman <davidg>
To:        CVS-commiters, cvs-lib
Subject:   cvs commit: src/lib/libc/gen getpwent.c
Message-ID:  <199506021123.EAA22867@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help
davidg      95/06/02 04:23:26

  Modified:    lib/libc/gen  getpwent.c
  Log:
  	The +@netgroup/-@netgroup NIS password overrides can fail in
  	some cases due to a subtle bug. Specifically, if you override
  	an NIS user's shell, /usr/bin/login and /usr/bin/su (and probably
  	other commands) can end up with bogus data for the pw_shell
  	member of the passwd structure *if* the do an endpwent(),
  	thereby preventing logins.
  
  	This happpens because the text fields in the passwd structure
  	(pw_name, pw_passwd, pw_gecos, pw_class, pw_dir and pw_shell)
  	are returned to the calling program as pointers to dycamically
  	allocated buffers, rather than pointers to static buffers as
  	they should be. Once endpwent() is called, the dynamic buffers
  	are free()ed, which invalidates the data returned by the
  	library functions.
  
  Note: Bill promises a more elegant solution in post-2.0.5R. This fix
  	is only a work-around.
  
  Submitted by:	Bill Paul



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506021123.EAA22867>