This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Races in group/passwd code (was Re: etc_changed, passwd & group)


On Tue, Jan 21, 2003 at 11:47:35AM -0500, Pierre A. Humblet wrote:
>Christopher Faylor wrote:
>>You'd need a per-thread buffer to accomplish that.  I assume that is
>>what you had in mind.
>
>If you look at them, most internal_get{pw,gr} calls from outside of
>passwd.cc and grp.cc only want the {u,g}id, the sid or the name, but
>never the other fields.  I wanted to avoid copying the entire line, at
>least in the first two cases.

Btw, Pierre, can you explain the rationale behind the "check" parameter
that some of the internal_* functions take?  Why would you not want to
check for an up-to-date /etc/passwd or /etc/group?  If not for this, it
seems like we could get rid of the initialization check entirely and
just let fn_changed return true when fn[etc_ix] is uninitialized,
forcing an initial read/parse of the appropriate file.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]