This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testers needed: New passwd/group handling in Cygwin


On Feb 13 17:30, Warren Young wrote:
> On 2/13/2014 07:38, Corinna Vinschen wrote:
> >
> >The new
> >mechanism will never read the entire file into memory, but only scan
> >for the requested entry and cache this one in memory[2].
> 
> Does this feature avoid the stale cache problem?
> 
> For instance, do you check the mtime on /etc/{passwd,group} before
> checking the cache, then dump the whole cache if the file was
> changed since the last file scan?

Yes.

> >   Apart from power shell scripting or inventing new CLI tools, these
> >   attributes can be changed using the "Attribute Editor" tab in the user
> >   properties dialog of the "Active Directory Users and Computers"
> >   MMC snap-in.
> 
> A week ago, we were talking about possible Cygwin
> {user,group}{add,mod} programs, modeled on Linux's.  Was that simply
> shelved once "net user" and MMC were found to be sufficient?

Huh?  "Apart from [...] or inventing new CLI tools, [...]"
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^

> If such programs existed, they could abstract away the difference
> between /etc/passwd, SAM and AD.  Plus, net.exe is a hairball.

Well, "net user" works.  New tools still have to catch up...

> If, magically, such programs were to appear from outside the Cygwin
> core dev group, would that be a good thing or a bad thing?

It would be a really great thing!

> >    unix="value"      Sets the NFS/Samba uid of the user to the decimal
> >                      value.  See the next chapter.
> 
> I know I'm bikeshedding, but "unix" seems like a pretty vague
> attribute name here.
> 
>     unix="good" ?
>     unix="linux" ?
>     unix="yesplease" ?
> 
> I'd be happier with "uid" or similar.
> 
> Write it in a sentence:
> 
> a. My uid is 502; vs
> b. My unix is 502.

Would you believe me that I sweated about this, too?  The important
thing to consider is, the keyword should not give the impression, that
the uid or gid set at this point is the Cygwin uid or gid.  It's only
the uid/gid of your NFS or Samba account on that weird Linux box.

Really, I'm open to suggestions to have a better keyword, but it
should make very clear that this is not your Cygwin uid/gid.

> >          If you create or change /etc/nsswitch.conf,
> >          make sure to stop and restart all Cygwin processes to pick up
> >          the change.
> 
> "All" processes?
> 
> If I have cron running, then exit the one instance of MinTTY after
> vim'ing /etc/nsswitch.conf, will the file be read when I re-open
> MinTTY?
> 
> cron.exe is running in a different process group, isn't it?
> 
> If true, I realize cron.exe and any programs it runs will continue
> to believe there is no /etc/nsswitch.conf until *it* restarts.

You are absolutely right, but, please, suggest a better wording.
This is what I'm trying to explain in fact, but everything I came
up with sounded like beating around the bush, more confusing than
helping.

> >the order [in nsswitch.conf] will be ignored by Cygwin.
> 
> Hmmm...different from Linux.

Yes, that's how it's implemented.  It's just a bitmask and the
order inside Cygwin is fixed.

> The inability to say "db files" as distinct from "files db" means
> you can't set up a SAM-only machine with SAM as a fast primary
> source of truth and "files" as a fallback.

What for?

> That seems like a sensible configuration to me, since SAM should
> always be more trustworthy than /etc/passwd.

Again, what for?  What entry would you find in passwd which you
didn't already find in SAM or via the implemented automatisms
for unknown SIDs?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpYhSY4tLLe5.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]