Help me understand few things

Corinna Vinschen cygwin@cygwin.com
Mon Apr 8 02:12:00 GMT 2002


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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list