From owner-freebsd-stable Sun Dec 8 19:38:54 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0DA837B401 for ; Sun, 8 Dec 2002 19:38:52 -0800 (PST) Received: from hardtime.linuxman.net (hardtime.linuxman.net [66.147.26.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D110C43ED4 for ; Sun, 8 Dec 2002 19:38:51 -0800 (PST) (envelope-from fullermd@over-yonder.net) Received: from mortis.over-yonder.net (localhost [127.0.0.1]) by hardtime.linuxman.net (8.11.6/8.11.6) with ESMTP id gB956mp18457; Sun, 8 Dec 2002 23:06:49 -0600 Received: by mortis.over-yonder.net (Postfix, from userid 100) id 569AD1F3B; Sun, 8 Dec 2002 21:38:37 -0600 (CST) Date: Sun, 8 Dec 2002 21:38:36 -0600 From: "Matthew D. Fuller" To: "Geoffrey C. Speicher" Cc: Don Bowman , "'freebsd-stable@freebsd.org'" Subject: Re: pw useradd not atomic? Message-ID: <20021209033836.GE67692@over-yonder.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i-fullermd.1 X-Editor: vi X-OS: FreeBSD Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 07, 2002 at 02:46:02AM -0500 I heard the voice of Geoffrey C. Speicher, and lo! it spake thus: > On Fri, 6 Dec 2002, Don Bowman wrote: > > > Sometimes after this script been run I end up with only the > > last few lines of the groups file. > > > > Is 'pw' not atomic somehow? The lines that are there seem > > complete, i'm just missing the first 100 lines or so. Its > > not always the same amount missing. > > This is discussed in bin/38676 in gnats, but there has been no followup > since June. This problem bit me more than once by corrupting > master.passwd, so I'm running a locally patched version until some kind of > fix hits -stable. There was also a good long discussion on -stable and -hackers over it. See PR bin/40127 for some of the code I had written to wrap a giant lock around it in a way that is generalized. Somewhere, I have the patches to pw(8) and friends to use that code that I could dig up; many of them were posted on the various threads referenced in that PR. I may be able to resurrect all my patches if there's interest; the previous thread pretty much petered out without anybody with a commit bit poking in enough interest to do anything with it. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ "The only reason I'm burning my candle at both ends, is because I haven't figured out how to light the middle yet" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message