Subject: Re: Hesiod thoughts
To: Thor Lancelot Simon <tls@cloud9.net>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 10/22/1995 23:08:43
>To begin with, I don't think that the way Hesiod is used at MIT is "right".
>At MIT, login uses hes_getpwnam() to get the user's password entry, and then
>*adds it to the local /etc/master.passwd* and then runs pwd_mkdb.  This
>seems absolutely wretched, though it does deal with the ugly compatibility
>issue of not having a getpwent() equivalent.

Hmmm ... I'm not that familiar with Hesiod, so correct me if I'm wrong.

Hesiod is the system where you use DNS to distribute user information, right?
Instead of using "IN" class records, you use "HS" class records.

I think that telling people that you can't use getpwent() is wrong; it's
pretty harsh to tell people that they can't find out who has valid accounts
on their system!  And if you want to find all accounts that begin with
string "foo" (or whatever), then you can't do this with Hesiod (from what
you're telling me).

I'm kinda surprised that so little code in NetBSD uses it, though.  As far
as I can tell, only the readline library, csh, and quotacheck use it.  I
don't think excising it would be that tramautic, but it certainly would
make NetBSD less friendly to port to.

One thing ... couldn't you implement getpwent() by doing a zone transfer
for the first call, storing all the records in memory, and then just
returning a pointer to the next record after every getpwent() call?

--Ken