Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Fri, 14 Sep 2001 15:01:07 +0200 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: Proposal: check and read /etc/{passwd,group} less frequently. Message-ID: <20010914150107.E25339@cygbert.vinschen.de> Reply-To: cygdev Mail-Followup-To: cygwin-developers AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from fujieda@jaist.ac.jp on Fri, Sep 14, 2001 at 09:25:05PM +0900 On Fri, Sep 14, 2001 at 09:25:05PM +0900, Kazuhiro Fujieda wrote: > >>> On 14 Sep 2001 16:33:05 +0900 > >>> Kazuhiro Fujieda said: > > > > How often is internal_getlogin called relative to get(p|g)w*? > > > > It is in set{g,u}id and uinfo_init. At the user's point of view, > > the cache is updated only when they execute another command. > > Oops, I've told a lie. it's a nonsense that internal_getlogin > invokes read_etc{passwd,group}. I tested it and found it > couldn't work as I intended. > > I'd like to change the proposal. Checking and reading > /etc/{passwd,group} should be held in uinfo_init. What about a long running server process e.g. started from cygrunsrv? It runs uinfo_init() just once at the beginning. It would never get the changes to /etc/passwd and /etc/group since it needs that info _before_ changing the user context (which would call internal_getlogin() directly from seteuid(), btw. -- no uinfo_init() at all). Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.