delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/11/11/12:04:10

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: <3DCFE314.3B5B45AB@ieee.org>
Date: Mon, 11 Nov 2002 12:04:20 -0500
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: cygwin-developers AT cygwin DOT com
Subject: Re: ntsec patch #4: passwd and group
References: <3DCBD52C DOT A1F794FD AT ieee DOT org> <20021108171918 DOT P21920 AT cygbert DOT vinschen DOT de> <3DCBEFF5 DOT 850B999E AT ieee DOT org> <20021111145612 DOT T10395 AT cygbert DOT vinschen DOT de> <3DCFC6BB DOT 570DF472 AT ieee DOT org> <20021111174720 DOT X10395 AT cygbert DOT vinschen DOT de>

Corinna Vinschen wrote:

> > There are still a couple of places where internal_getgrent () is
> > called and they will have to be cleaned up some way.
> 
> That's correct, they are undermining thread safety.  However, they
> are not alwaus used to retrieve the SID.  Some calls are basically
> used to get a uid/gid or the whole passwd/group entry.  OTOH, they
> must not interfere with the internal calls.  We still need "internal"
> calls additionally to your getgrsid/getpwsid calls.

Yes. I simply wanted to say that outside of passwd/grp.cc the only spots to 
watch are those that have internal_getgrent (). If it was simply a matter
of calling the new functions, I would have done it.

> That's not a problem at all.  The non _r calls are not meant to
> be thread safe so they may use static local buffers legally.

We have two distinct issues: 1): Thread safe. 2) Having valid pointers 
after the passwd/grp file is updated, in a single threaded program. 
The static buffers flunk both, they can only flunk 1). 
 
> You didn't send patches, just a ChangeLog entry.
For #1 and #2 I sent patches as attachment (from Netscape). I just looked
at the web, the patches show up as part of the messages
For #3 there was always a short patch inside the e-mail.

Pierre

- Raw text -


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