Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 1997 23:15:49 -0500
From:      Dave Chapeskie <dchapes@golden.net>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Password file builds
Message-ID:  <19971031231549.15334@golden.net>
In-Reply-To: <Pine.BSF.3.95q.971031091816.10242B-100000@misery.sdf.com>; from Tom on Fri, Oct 31, 1997 at 09:22:31AM -0800
References:  <19971031042509.23697@golden.net> <Pine.BSF.3.95q.971031091816.10242B-100000@misery.sdf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 31, 1997 at 09:22:31AM -0800, Tom wrote:
>   The biggest problem with this is, that there are no tools to fix or
> verify db files.  If the /etc/pwd.db or /etc/spwd.db becomes damaged,
> you're screwed.

So you regenerate the text version periodicly (if required) from cron
and you keep backups of the database and text versions.  You do keep
backups don't you?

>   Also, there are locking issue with in place updates of db files.
> Do the pw routines in libc even do locking?  I don't think so.  What
> happens if someone calls getpwnam() at the while someone else is
> writing a new entry into the database?

The man page for pwd_mkdb clearly states that it leaves locking up to
the front-ends (chpass, passwd, vipw).  That locking would still be
maintained, just the text file wouldn't be updated.

-- 
Dave Chapeskie, DDM Consulting
E-Mail: dchapes@golden.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971031231549.15334>