This is the mail archive of the cygwin-developers@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: 1.3.20


On Sat, Feb 01, 2003 at 06:17:09AM -0500, Pierre A. Humblet wrote:
>At 11:11 PM 1/31/2003 -0500, you wrote:
>>Given my botch in passwd.cc, we should probably release a new version
>>of cygwin ASAP.
>
>Chris,
>
>I had a look at passwd/group. 
>
>linebuf must be static but not NO_COPY, as a forked process will inherit
>malloced objects from its parent and the passwd_buf object may point to
>linebuf.
>
>The internal cygwin functions should only read the pwd/grp if they have 
>never been read, but not reread then after a change (I explained why 
>before).

Translation: "cgf - when you did your automatic conversion of the old
code to the new, structured code, you got the logic backwards."

I think I'll just get rid of the default entirely.  Nearly every time I
use a default arg, I end up regretting it, just like this time.

>Next, I would call pr.refresh (true) from setpwent() but I would not call
>pr.refresh from getpwent (rereading the passwd file while scanning can lead
>to strange results). Ditto for setgreent and getgreent32

Ok.  Don't you still have to call pr.refresh in the get??ent case in
case it isn't initialized?  Is it guaranteed to be initialized by the time it
gets to the get* functions?  Otherwise, I agree with your assessment.

>There is no reason to call pr.refresh in getpass(), that is only an input 
>function to read a password, nothing to do with the /etc/passwd file.

Yep.

>If internal functions never reread the file ("check" is false), you can 
>revert the pglock->acquire test you added yesterday. It will never be 
>reached while loading the file and will never be true in other circumstances.

I don't know.  That is a very cheap test.  It's just a couple of assembly
instructions.  I'm inclined to leave it in just for paranoia's sake.

>>Besides Pierre's outstanding ntsec problems, are there other issues that
>>would hold up a release?
>
>My only change that is urgent is the chown fix. I have tested all variations
>I could think off and could send you a patch w.r.t the current cvs (I haven't 
>heard from Corinna recently).

Thanks,
cgf


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