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: NSS and db


Hi all,

Ulrich Drepper writes:
 > > I wonder what the serial number is used for. I guessed that there is a
 > > convention that getXXXent() has to return entries in the same order as
 > > they appear in /etc/passwd, which would IMHO not be a very good idea.
 >
 > Why should we have added this if it wasn't necessary?

Besides 999 other reasons, there is at least the possibility that this
piece of code could be improved and nobody has ever questioned this
fact.

I am probably starting to write an NSS module using DJB's CDB library
and just stumbled over that behaviour of libnss_db by looking at the
db-Makefile. As CDB stores the records in the order they are written,
the easiest way is to return them in order anyway. However, I assumed
that I found a way to save some disk space when using libnss_db.

 > YOu need it for the getXXent() functions.

That's what I guessed.

Thanks,
	Marcus
-- 
	  Some operating systems are called `user friendly',
		  UNIX however is `expert friendly'.

    Marcus Harnisch <mailto:marcus@harnisch.isdn.cs.tu-berlin.de>

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