From b279956f2cfbdf94559292e7835d5f3f8b78f4a5 Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 24 Apr 1997 06:22:16 +0000 Subject: [PATCH] Use futimes(2), to prevent race conditions. --- usr.bin/ar/extract.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ar/extract.c b/usr.bin/ar/extract.c index 8d42841fe9df..67767679b265 100644 --- a/usr.bin/ar/extract.c +++ b/usr.bin/ar/extract.c @@ -1,4 +1,4 @@ -/* $NetBSD: extract.c,v 1.5 1995/03/26 03:27:53 glass Exp $ */ +/* $NetBSD: extract.c,v 1.6 1997/04/24 06:22:16 mycroft Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)extract.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$NetBSD: extract.c,v 1.5 1995/03/26 03:27:53 glass Exp $"; +static char rcsid[] = "$NetBSD: extract.c,v 1.6 1997/04/24 06:22:16 mycroft Exp $"; #endif #endif /* not lint */ @@ -115,7 +115,7 @@ extract(argv) } if (options & AR_O) { tv[0].tv_sec = tv[1].tv_sec = chdr.date; - if (utimes(file, tv)) { + if (futimes(tfd, tv)) { warn("utimes: %s", file); eval = 1; }