Subject: Re: Heads up: *possible* bug in cygwin
From: Christopher Faylor <[email-masked]>
To: [email-masked]
Cc: "Pierre A. Humblet" <[email-masked]>
Date: Wed, 1 Jan 2003 19:01:12 -0500

On Wed, Jan 01, 2003 at 04:13:42PM -0500, Pierre A. Humblet wrote:
>On Wed, Jan 01, 2003 at 02:48:54PM -0500, Christopher Faylor wrote:
>>I've uploaded a new snapshot which should correctly calculate the
>>buffer size for overflow conditions and returns a large number for
>>_SC_GETPW_R_SIZE_MAX
>
>Chris, I don't understand your changes in getpwuid_r32.  The uid and
>gid are stored in struct passwd pwd fields and don't consume any space
>in the buffer.  The buffer is filled with the strcpy's toward the end.
>I don't see problems there.

Oops.  You're right.  So, the only potential problem is that the getpw
routines aren't thread safe.  There is a window during the passwd info
resides in a static structure.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/