cvs commit: src/lib/libc/gen getpwent.c

Jacques Vidrine nectar at FreeBSD.org
Fri Apr 18 10:27:06 PDT 2003


nectar      2003/04/18 10:27:05 PDT

  FreeBSD src repository

  Modified files:
    lib/libc/gen         getpwent.c 
  Log:
  Don't use `memset' to initialize a struct passwd.  A module
  may not fill in all fields, and in the case of string fields, this could
  cause trouble for applications.  (The only likely example is `pw_class',
  because this field is not used by all modules in all cases.)
  
  Move initialization of struct passwd from module-specific code to the
  dispatch code.
  
  The problem of a NULL pw_class was
  Noticed by:     Philip Paeps <philip at paeps.cx>
                      and the c^Htrusty ssh(1) command.
  Déjà vu by:     getpwent.c revision 1.56
  
  Sponsored by:   DARPA, Network Associates Laboratories
  
  Revision  Changes    Path
  1.74      +31 -6     src/lib/libc/gen/getpwent.c


More information about the cvs-src mailing list