From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14233 invoked by alias); 13 Feb 2014 14:35:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14224 invoked by uid 89); 13 Feb 2014 14:35:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mho-01-ewr.mailhop.org Received: from mho-03-ewr.mailhop.org (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 13 Feb 2014 14:35:47 +0000 Received: from pool-173-76-49-34.bstnma.fios.verizon.net ([173.76.49.34] helo=cgf.cx) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1WDxOD-000AjP-0Y for cygwin@cygwin.com; Thu, 13 Feb 2014 14:35:45 +0000 Received: from ednor (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with SMTP id 49B0B6010A for ; Thu, 13 Feb 2014 09:35:41 -0500 (EST) Received: by ednor (sSMTP sendmail emulation); Thu, 13 Feb 2014 09:35:41 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/dcFARV3WyQ938e2dRqcTn Date: Thu, 13 Feb 2014 14:38:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?) Message-ID: <20140213143541.GC6750@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <52F95D1D.4050108@tiscali.co.uk> <4510121021.20140211062515@mtu-net.ru> <52FAB14C.8060800@tiscali.co.uk> <52FABAF5.2060701@etr-usa.com> <52FAD730.9090507@redhat.com> <20140212090804.GM2821@calimero.vinschen.de> <52FB9E51.7030607@cornell.edu> <20140212195931.GA2246@calimero.vinschen.de> <20140212213729.GA5589@ednor.casa.cgf.cx> <20140213100025.GB24159@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140213100025.GB24159@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2014-02/txt/msg00306.txt.bz2 On Thu, Feb 13, 2014 at 11:00:25AM +0100, Corinna Vinschen wrote: >On Feb 12 16:37, Christopher Faylor wrote: >> On Wed, Feb 12, 2014 at 08:59:31PM +0100, Corinna Vinschen wrote: >> >There's only one tiny problem. Whatever I think about the full >> >enumerate being right or wrong, I have this vague feeling that I'd like >> >to have this implemented fully at one point. My cat disapproves, but we >> >can't agree on everything, I guess. Another configuration option in >> >/etc/nsswitch.conf might comfort her. >> >> I don't know if this has been mentioned but would a cache help here, >> i.e., nscd? I think that's how Linux deals with this type of situation. > >Caching is wonderful for the usual requests for single entries from the >DB, and for this we have already two caches, the LSA cache and Cygwin's >own cache. But caching doesn't help at all when enumerating. > >There's also the problem to rely on an external program. But that's no different than Linux. I've never looked at the code but apparently libc has hooks for talking to nscd. We could do the same with cygserver. >If it turns out that the current implementation is too slow, I'm >prepared to add caching to cygserver to have a system-wide caching >server, but Cygwin shouldn't *require* that cygserver runs. And either >way, it still wouldn't help when enumerating all accounts. nscd does more than just keep information around in memory. As I said, it's how Linux deals with this situation. I know because I didn't install nscd when setting up a minimal Fedora 20 server at work and was met with awful lags and timeouts in services which tried to read from our nis. So Fedora doesn't require nscd but it sure does help. But, even after having set it up, I still have to remember not to do ls ~cg because it just takes forever. So, if it is possible to enumerate users then I think you just do it and let people learn the cost. I also would be pretty reluctant about deprecating a standard linux function since there is nothing here that I can see which makes this a distinctly linux problem unless you actually can't enumerate users. cgf cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple