From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)
Date: Thu, 13 Feb 2014 15:48:00 -0000 [thread overview]
Message-ID: <20140213154333.GA6304@ednor.casa.cgf.cx> (raw)
In-Reply-To: <20140213144419.GI2246@calimero.vinschen.de>
On Thu, Feb 13, 2014 at 03:44:19PM +0100, Corinna Vinschen wrote:
>On Feb 13 09:35, Christopher Faylor wrote:
>> 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<tab> 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.
>
>Yes, I think so too. I have some preliminary code (actually, just
>empty function shells right now) which are supposed to implement
>full enumerating.
>
>However, system admins might not exactly approve. I discussed this
>with our Linux folks, and I learned that NSS backends like SSSD or
>winbind default to NOT allowing enumerating, but giving the admin a
>choice to enable it.
>
>So I think for our case a configuration option in /etc/nsswitch.conf
>to limit the scope of the enumeration might be feasible.
Or, nscd.conf which has stuff like:
enable-cache passwd yes
positive-time-to-live passwd 600
negative-time-to-live passwd 20
suggested-size passwd 211
check-files passwd yes
persistent passwd yes
shared passwd yes
max-db-size passwd 33554432
auto-propagate passwd yes
I understand why a sysadmin might not want you to be able to enumerate
user names but that really isn't, IMO, a reason not to implement the
functionality (not that you are proposing this). You obviously can't
assume that people won't exercise the capability if it is available.
Security through obscurity...? Nah.
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
next prev parent reply other threads:[~2014-02-13 15:43 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 7:29 cygwin-1.7.28 getpwent header declaration changes ? Marco Atzeri
2014-02-06 9:01 ` Corinna Vinschen
2014-02-06 10:20 ` Marco Atzeri
2014-02-06 13:00 ` Jan Nijtmans
2014-02-06 14:02 ` Corinna Vinschen
[not found] ` <CAO1jNws3H_Wbec=y_UoYkhrb5nMX7iT7_A5XaHcQKCw32o055g@mail.gmail.com>
2014-02-06 14:15 ` Fwd: " Jan Nijtmans
2014-02-06 14:28 ` Corinna Vinschen
2014-02-06 14:41 ` Corinna Vinschen
2014-02-06 14:13 ` Corinna Vinschen
2014-02-06 21:43 ` get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?) Warren Young
2014-02-07 9:49 ` Corinna Vinschen
2014-02-07 12:50 ` Andrey Repin
2014-02-07 17:26 ` Warren Young
2014-02-07 18:20 ` Andrey Repin
2014-02-07 13:53 ` David Stacey
2014-02-07 17:51 ` Warren Young
2014-02-07 19:21 ` Corinna Vinschen
2014-02-09 16:10 ` Warren Young
2014-02-09 16:16 ` Corinna Vinschen
2014-02-09 16:31 ` Corinna Vinschen
2014-02-09 16:37 ` Ken Brown
2014-02-09 17:12 ` David Stacey
2014-02-10 10:48 ` Warren Young
2014-02-10 13:16 ` Peter Rosin
2014-02-10 22:05 ` Warren Young
2014-02-10 23:35 ` David Stacey
2014-02-11 2:35 ` Andrey Repin
2014-02-12 0:06 ` David Stacey
2014-02-12 2:06 ` Warren Young
2014-02-12 3:54 ` Eric Blake
2014-02-12 9:09 ` Corinna Vinschen
2014-02-12 12:05 ` Andrey Repin
2014-02-12 15:16 ` Richard
2014-02-12 16:24 ` Ken Brown
2014-02-12 17:05 ` Richard
2014-02-12 17:15 ` Andrey Repin
2014-02-12 20:49 ` Corinna Vinschen
2014-02-12 22:53 ` Christopher Faylor
2014-02-13 11:46 ` Corinna Vinschen
2014-02-13 14:35 ` Andrey Repin
2014-02-13 14:38 ` Christopher Faylor
2014-02-13 15:37 ` Corinna Vinschen
2014-02-13 15:48 ` Christopher Faylor [this message]
2014-02-13 16:09 ` Corinna Vinschen
2014-02-13 18:33 ` get rid of getpwent? Achim Gratz
2014-02-13 19:02 ` Andrey Repin
2014-02-13 20:41 ` Corinna Vinschen
2014-02-13 21:48 ` Achim Gratz
2014-02-14 9:46 ` Corinna Vinschen
2014-02-12 4:40 ` get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?) Andrey Repin
2014-02-07 20:09 ` Warren Young
2014-02-07 20:25 ` Warren Young
2014-02-07 21:01 ` Corinna Vinschen
2014-02-07 21:30 ` Corinna Vinschen
2014-02-07 21:49 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-02-08 10:38 ` Corinna Vinschen
2014-02-08 21:29 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-02-09 1:29 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2014-02-07 21:44 ` Larry Hall (Cygwin)
2014-02-07 22:45 ` David Stacey
2014-02-07 23:39 ` Larry Hall (Cygwin)
2014-02-08 0:50 ` Andrey Repin
2014-02-08 15:19 ` Warren Young
2014-02-08 15:39 ` Warren Young
2014-02-09 20:06 ` cygwin-1.7.28 getpwent header declaration changes ? Marco Atzeri
2014-02-09 20:20 ` Corinna Vinschen
2014-02-10 16:14 ` Marco Atzeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140213154333.GA6304@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).