From owner-cvs-all@FreeBSD.ORG Fri Apr 18 10:27:06 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24B5837B405; Fri, 18 Apr 2003 10:27:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C903643FA3; Fri, 18 Apr 2003 10:27:05 -0700 (PDT) (envelope-from nectar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3IHR50U011321; Fri, 18 Apr 2003 10:27:05 -0700 (PDT) (envelope-from nectar@repoman.freebsd.org) Received: (from nectar@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3IHR5bN011320; Fri, 18 Apr 2003 10:27:05 -0700 (PDT) Message-Id: <200304181727.h3IHR5bN011320@repoman.freebsd.org> From: Jacques Vidrine Date: Fri, 18 Apr 2003 10:27:05 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/gen getpwent.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2003 17:27:07 -0000 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 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