Subject: Re: setpwfile() can no longer open alternate password files, why?
To: John Maier <johnam@datastorm.com>
From: J.T. Conklin <jconklin@netcom.com>
List: netbsd-users
Date: 04/23/1997 21:08:17
> Looking through the book, "Using C on the UNIX System" from O'Reilly by
> David A. Curry (good book!), I took a look at the password stuff. The
> book is a bit out of date on the password stuff (structure is out of
> date) but I figured I could get some pointers. I read that, setpwfile
> can open alternate password files.
> Alas, I look at the NetBSD 1.1 man page on setpwfile and at the bottom,
> under compatibility I read to my dismay...
> So why did this happen? Now I'm now stuck writing code, duplicating
> effort, learning new things....
I think this was gone before Net/2. I suspect that it and f{get,put}pwent
were removed about the same time as the *.db passwd files were introduced.
After that change, that portion of the API wasn't sufficent to maintain
the passwd database. Nothing has been invented to replace it.
IMO now that we've added YP (and soon nsswitch), I don't think the system
passwd functions are appropriate for use for private passwd databases. I
would bite the bullet and write my own routines. A implementation that
supports only the traditional flat files should be a simple evening
project.
--jtc