Pierre A. Humblet
Sat Feb 1 11:18:00 GMT 2003
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.
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
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). Thus "check" should be false in refresh() when called from
The easiest way to achieve that is to set the default value of "check" to
"false" in the declaration of refresh() in pwdgrp.h. That matches the
default value of "check" in the internal_xx function declarations and
would reduce confusion.
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
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.
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.
>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).
More information about the Cygwin-developers