[1126] in NetBSD-Development
Broken locking disciplines
daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Nov 16 22:01:51 1995
Date: Thu, 16 Nov 1995 22:01:17 -0500
From: Greg Hudson <ghudson@MIT.EDU>
To: pc-dialup@MIT.EDU, netbsd-dev@MIT.EDU
Sam and I discovered that the NetBSD locking convention is not robust,
and is in fact quite pessimal for automatically modifying
/etc/master.passwd. (For manual modifications, it's very unlikely to
cause problems because you're doing non-blocking locks, but it still
isn't technically correct.)
I've implemented a new locking convention where you lock a file in
/var/run. I've implemented the change in libAL and cleanup; xlogin,
login, and ftpd will learn how to use libAL this weekend, hopefully,
so I can stop implementing login code in four different places and
cleanup besides.
For now, for ringworld:
* I've installed a new telnetd and cleanup.
* I've disabled the Athena ftpd for now.
* Logging in on the console causes a locking violation, as is
using vipw. These don't happen often enough for me to worry
about just now.
I'm not sure if my code works fully yet, and it doesn't do enough
error detection. I'm trying to get something working for ringworld
for the moment.
A sort-of bonus: we're no longer locking files in /etc, which may or
may not reduce the incidence of ringworld crashes. I'd rather fix the
relevant kernel bug, so I don't know if it would be a good thing or
not.