public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eric Blake <ebb9@byu.net>
To: cygwin@cygwin.com,  mark_z@charter.net
Subject: Re: "id -Gn" w/ username doesn't return all associated groups.  Issue  with getgrent()?
Date: Mon, 22 Jan 2007 13:03:00 -0000	[thread overview]
Message-ID: <45B4B622.9040406@byu.net> (raw)
In-Reply-To: <20070122093419.GR27843@calimero.vinschen.de>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Corinna Vinschen on 1/22/2007 2:34 AM:
>> When "id" is called without a username, it calls the getgroups(...) function
>> which appears to work as expected.  However, when a specific username is
>> passed, even the username of the current user, getugroups(...) is called,
>> and does _not_ appear to work as expected.
> 
> That's by design.  getgroups() has access to the user token of the
> current process and returns every group which is in this token.
> getgrent() is a function which enumerates /etc/groups.

So my translation of this would be that the bug is not in id, but in the
fact that your /etc/groups is out-of-date.  Use mkgroups to remedy the
situation.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
volunteer cygwin coreutils maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtLYi84KuGfSFAYARAniSAJ98xc4e+t/eN6oyjTUJh3db5/DnLACgx3bC
WhRr6QVDuMuFUfJvp/zCRr8=
=OOLE
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2007-01-22 13:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-21 22:50 Mark A. Ziesemer
2007-01-22  9:34 ` Corinna Vinschen
2007-01-22 13:03   ` Eric Blake [this message]
2007-01-22 13:29     ` Corinna Vinschen
2007-01-22 15:23       ` Mark A. Ziesemer
2007-01-22 15:40         ` "id -Gn" w/ username doesn't return all associated groups. Issue with getgrent()? Corinna Vinschen
2007-01-23  1:15           ` Mark A. Ziesemer
2007-01-23  3:21             ` Eric Blake
2007-01-23 23:35               ` Mark A. Ziesemer
2007-01-24  1:24                 ` dmccunney

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=45B4B622.9040406@byu.net \
    --to=ebb9@byu.net \
    --cc=cygwin@cygwin.com \
    --cc=mark_z@charter.net \
    /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).