Subject: Re: CVS commit: src/lib/libpam/modules/pam_unix
To: John Nemeth <>
From: Luke Mewburn <>
List: current-users
Date: 04/19/2005 14:18:21
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 18, 2005 at 09:10:48PM -0700, John Nemeth wrote:
  | On Aug 4,  3:47pm, Luke Mewburn wrote:
  | }=20
  | } Module Name:	src
  | } Committed By:	lukem
  | } Date:		Tue Apr 19 03:40:16 UTC 2005
  | }=20
  | } Modified Files:
  | } 	src/lib/libpam/modules/pam_unix: pam_unix.c
  | }=20
  | } Log Message:
  | } Safety boots: don't depend upon getpwnam_r() to set pwd to NULL on all
  | } failures, especially if we're going to ignore the return result.
  |      Umm, I thought the result of the discussion was that POSIX
  | mandates that pwd be set to NULL for all errors AND when the entry
  | isn't found.  Thus if pwd isn't set to NULL for some failure case then
  | getpwnam_r is very broken.

True, it is very broken.  However, if we're going to ignore the return
result of a function yet check a pointer we've passed to it against
NULL later on, it doesn't hurt to ensure that we assign the pointer
to a known NULL value before invocation.  That's the "safety boots"

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.1 (NetBSD)