This is the mail archive of the 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: Help me understand few things

On Mon, Apr 08, 2002 at 10:28:57AM +0200, Corinna Vinschen wrote:
> On Fri, Apr 05, 2002 at 10:00:02PM -0800, Gupta, Sanjay wrote:
> > Q3: When logged in via ssh, if I run
> > $ id -Gn
> > None Everyone Guests Power Users Users ORA_DBA
> > It displays all the Primary and Secondary Groups belong to the current user.
> > My current user is Guest.
> > but when I specify
> > $ id -Gn Guest
> > None
> Yes, you mentioned it already twice this weekend.  Could be a bug.
> A quick strace run didn't help, though.

...but a look into the sources did.  If you call `id' w/o a
name, id calls getgroups() which in Cygwin returns the group
list from the process token.  If you call `id' with a name,
id assumes that you are not the sme person as the one you're
asking for information about.  In that case it can't call
getgroups() but searches /etc/passwd and /etc/group by itself.
And /etc/group doesn't contain any supplementary groups in
your case.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Bug reporting:

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