This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


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

Re: libc/1565: getgroups() returns wrong number of supplementary


   From: kareemy@earthlink.net
   Date: Mon, 31 Jan 2000 17:17:04 -0500 (EST)

   On 31-Jan-2000 Mark Kettenis wrote:
   >  glibc has this nifty feature called name service switch.  It
   > can collect its data from several sources (NIS, NIS+, hesiod,
   > databases in /var/db, files in /etc) in a transparent fashion.  It is
   > much more likely that one of these services duplicates information.
   > This is especially true if you use the "db" nss module, since its data
   > is generally generated form the data for the "files" nss modules
   > (/etc/group).

   I understand what you are saying, and since I do believe I am using
   the db nss module, it could be the problem, however, the directory
   /var/db does not exist on my system

If the databases don't exists, you couldn't be using the "db" module
culd you?

   > For now, if the problem annoys you enough, removing "db" from the line
   > that starts with "group:" probably will do the trick.

   Is that from the file /etc/nsswitch.conf? I do not have that
   file. There is an example nsswitch.conf file in my glibc build
   directory but i never bothered with it, since my system before did
   not have nsswitch.conf.

Yes, sorry!  If you don't have the file the default is:

   group: compat [NOTFOUND=return] files

compat does something weird, looking things up in files but using NIS
under some circumstances.  initrgoups() deliberately ignores the
[NOTFOUND=return] and then goes on to use the files again.
Everything, except initgroups() ignoring [NOTFOUND=return] is nicely
documented in the manual.

   Do I need to create that file and configure the databases in /var/db?

Well, don't create the databases if you want to avoid duplicates.  If
you create an /etc/nsswitch.conf with:

   group: files

You'll no longer see the duplicates.  This would be OK if you're not
using NIS or NIS+.

Mark


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