Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ritcv.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!floyd!cmcl2!seismo!rochester!ritcv!kar From: kar@ritcv.UUCP (Kenneth A. Reek) Newsgroups: net.bugs.4bsd Subject: Re: Null entries in passwd Message-ID: <1078@ritcv.UUCP> Date: Sun, 3-Jun-84 09:28:50 EDT Article-I.D.: ritcv.1078 Posted: Sun Jun 3 09:28:50 1984 Date-Received: Tue, 5-Jun-84 19:33:04 EDT References: <172@kovacs.UUCP> <37@ttdsv.UUCP> Organization: Rochester Institute of Technology, Rochester, NY Lines: 12 The "passwd" and "chfn" programs we got with our 4.1 distribution a long time ago used a very naive locking protocol that failed due to a race condition. This sometimes resulted in one user's passwd process reading the file at the same time another user's process was writing it, resulting in missing fields, truncating the passwd file, and so forth. We changed the passwd program to use the "link" protocol for file locking and have not had any problems since. I just took a quick look at the 4.2 passwd code, and the problem appears to be solved by the use of the exclusive option when opening the lock file. Ken Reek, Rochester Institute of Technology {allegra,seismo}!rochester!ritcv!kar