[ pulled over to -hackers as well ]
On Sun, 23 Jun 2002, Matthew D. Fuller wrote: > On Sun, Jun 23, 2002 at 09:00:52AM -0700 I heard the voice of > Paul Herman, and lo! it spake thus: > > On Sun, 23 Jun 2002, Geoffrey C. Speicher wrote: > > > > How so? I'm not suggesting unlink(2)ing /etc/master.passwd or > > /etc/spwd.db at all. > > No, but pw(8) does; making it not do so would require reasonably > extensive rewriting. Indeed it does do this. However, that seems to be the crux of the problem. The current pw(8) behavior was (probably) not only a convenient way to update files in /etc, but an attempt to narrow (not eliminate) the window for race conditions. If this is fundamentaly flawed, *this* should be fixed, and not have a larger band aid put over it. I can't imagine it would be too extensive of a rewrite. The temp file code could be kept, and in fileupd.c:fileupdate() instead of rename("/etc/master.passwd.new", "/etc/master.passwd"), it just copies the contents of the .new file into the original file (that has the O_EXLOCK.) -Paul. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message