Subject: Re: CVS commit: basesrc/usr.sbin/dev_mkdb
To: current-users <current-users@netbsd.org>
From: Ken Wellsch <kwellsch@tampabay.rr.com>
List: current-users
Date: 07/06/2001 19:00:24
> Date: Thu, 5 Jul 2001 23:35:35 +0300 (EEST)
> From: Emmanuel Dreyfus <manu@netbsd.org>
> To: source-changes@netbsd.org
> Subject: CVS commit: basesrc/usr.sbin/dev_mkdb
> Message-Id: <20010705203535.3F570B00B@cvs.netbsd.org>
>
> Module Name: basesrc
> Committed By: manu
> Date: Thu Jul 5 20:35:34 UTC 2001
>
> Modified Files:
> basesrc/usr.sbin/dev_mkdb: dev_mkdb.c
>
> Log Message:
> - - Moved the temp file to /tmp instead of /var/tmp
> - - Added a O_EXCL flag so that we cannot open an existing file for temp file
The problem with switching to /tmp being when this code executes:
if (rename(dbtmp, dbname))
err(1, "rename %s to %s", dbtmp, dbname);
it will fail for people (like me) with /var and/or /tmp living
on different partitions (or being their own partitions).
-- Ken