Subject: Re: setpwfile() deprecated. Why?
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: Trouble Free RecepPFFFFFFFFFFFFFFFF <>
List: current-users
Date: 07/17/1996 08:41:20
der Mouse sez:
 * > I'm curious as to why setpwfile() was deprecated.
 * Probably about the same time networked passwd databases came in.  Sun
 * did the same thing.

Yeah, but in Solaris, they at least provide you with fgetpwent(FILE *fp).

 * In both cases (NetBSD and Sun) I think it's stupid.  It's just too
 * useful to be able to work on alternative databases, and deprecating it
 * really doesn't buy anything.  (All I can see is the dubious benefit of
 * being able to throw away the plain-passwd-file parsing code, and that
 * only in our case - Sun still has it around, though we use db files.)
 * Yeah, you lose network databases if you setpwfile().  What's wrong with
 * that?  Anyone calling setpwfile() presumably doesn't care about where
 * the system gets its live passwd data from.

As I said, I'm using it for debugging programs.

And as far as deprecating the usage of the getpw*() routines, although
they should not probably be used in normal usage (i.e. you look specifically
for the entry you want), there are times where you want to get EVERY entry
from the database.  At that point, you likely don't give a rodent's whistling
sphincter as to efficiency, you just want the data.

Case in point:  my program.  I'm writing something that goes through the
passwd file and for each login generates output along the lines of:

flastname:	login
first.last:	login
first_last:	login

(If you haven't figured it out yet, it's an automagic mail target generator,
geared toward inclusion in a .alias file.)

And btw, I'm merely reinforcing what der Mouse has said -- I'm certainly
not arguing with him as he supported my premise. :-)

 * 					der Mouse

[shouldn't that be "der Maus"? :-)]

 * 		    01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D

What's that last line? md5 sig?


People who cannot be persuaded to use turn signals or ashtrays while driving
should not be permitted to drive.