[337] in NetBSD-Development
Re: More stuff in the install
daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon Jan 2 17:24:01 1995
To: yoav@MIT.EDU
Cc: ghudson@MIT.EDU, yandros@MIT.EDU, jtk@atria.com, netbsd-dev@MIT.EDU
In-Reply-To: Your message of "Mon, 02 Jan 1995 11:34:58 EST."
<199501021634.LAA07087@lola-granola.MIT.EDU>
Date: Mon, 02 Jan 1995 17:24:15 -0500
From: Greg Hudson <ghudson@MIT.EDU>
> No, we don't want to use POSIX file locking. (or we do, but there's
> a slight catch.. if you look at the NetBSD login code.. they have
> really nice comments as to why they do what they do)
I couldn't find any comments in the NetBSD login code relating to file
locking. However, I did find a nice file called pw_util.c in
/usr/src/usr.sbin/vipw, which is presumably duplicated in chpass and
passwd. It uses POSIX file locking for the master.passwd file, which
is about the simplest thing possible. pw_util.c also provides
functions pw_mkdb() and pw_tmp() for creating the new database and
creating a temporary passwd file.
I think incorporating pw_util.c into any new Athena code which edits
the password files would be a good idea; it's a fairly nice interface.
We could even write a version of pw_util.c that works on other
operating systems; pw_mkdb() would be a null operation under Ultrix,
but under AIX and maybe Solaris it would generate the new /etc/passwd
file.
Anyway, in the short term we can leave all the Athena stuff as it is,
and my installation script will not create an /etc/passwd.local (just
an /etc/group.local).