delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/02/01/06:18:03

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Message-Id: <3.0.5.32.20030201061709.0080be50@h00207811519c.ne.client2.attbi.com>
X-Sender: pierre AT h00207811519c DOT ne DOT client2 DOT attbi DOT com
Date: Sat, 01 Feb 2003 06:17:09 -0500
To: cygwin-developers AT cygwin DOT com
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
Subject: Re: 1.3.20
In-Reply-To: <20030201041117.GA20843@redhat.com>
Mime-Version: 1.0

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). Thus "check" should be false in refresh() when called from 
internal functions.

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).

Pierre

 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019