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

2003-01-21 Thread Christopher Faylor
On Tue, Jan 21, 2003 at 06:42:25PM -0500, Pierre A. Humblet wrote: >Christopher Faylor wrote: >> >> >> 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/g

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

2003-01-21 Thread Pierre A. Humblet
Christopher Faylor wrote: > > > 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? Two reasons: 1) "check" is only true when the internal functions

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

2003-01-21 Thread Christopher Faylor
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,

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

2003-01-21 Thread Christopher Faylor
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

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

2003-01-21 Thread Pierre A. Humblet
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 av

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

2003-01-21 Thread Christopher Faylor
On Tue, Jan 21, 2003 at 10:53:29AM -0500, Pierre A. Humblet wrote: >Christopher Faylor wrote: >This has been there forever, I would not delay the release of 1.3.19 Did I say I was delaying anything? >By the way, I wrote the internal_get{pw,gr} routines having in mind >that they could be extended

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

2003-01-21 Thread Pierre A. Humblet
Christopher Faylor wrote: > > After consolidating all of the lock code into a "refresh" method, > I realized that there are some pretty big races in the group/passwd > code. You can't just protect the reading of the buffers against > multiple access, you have to protect all operations which manip

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

2003-01-21 Thread Christopher Faylor
After consolidating all of the lock code into a "refresh" method, I realized that there are some pretty big races in the group/passwd code. You can't just protect the reading of the buffers against multiple access, you have to protect all operations which manipulate the passwd/group buffers since