From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 2 19:28:04 2006 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8FF716A41F; Mon, 2 Jan 2006 19:28:04 +0000 (GMT) (envelope-from hika@bsdmon.com) Received: from smtp.bsdmon.com (hosting-28.42.rev.fr.colt.net [213.41.42.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C97043D58; Mon, 2 Jan 2006 19:27:58 +0000 (GMT) (envelope-from hika@bsdmon.com) Received: from localhost (localhost [127.0.0.1]) by smtp.bsdmon.com (Postfix) with ESMTP id E38393760AC; Mon, 2 Jan 2006 20:27:56 +0100 (CET) Received: from smtp.bsdmon.com ([127.0.0.1]) by localhost (freefugu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17383-19; Mon, 2 Jan 2006 20:27:30 +0100 (CET) Received: from mail.bsdmon.com (14.128.101-84.rev.gaoland.net [84.101.128.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.bsdmon.com (Postfix) with ESMTP id 06F3737606C; Mon, 2 Jan 2006 20:27:29 +0100 (CET) Received: by sdf1.bsdmon.com (Postfix, from userid 1001) id 825E7B853; Mon, 2 Jan 2006 20:27:19 +0100 (CET) Date: Mon, 2 Jan 2006 20:27:19 +0100 From: Gilbert Cao To: Bruce Evans Message-ID: <20060102192719.GC1030@bsdmon.com> References: <20051231112258.C4B72B853@sdf1.bsdmon.com> <20060101105648.J39665@delplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6Nae48J/T25AfBN4" Content-Disposition: inline In-Reply-To: <20060101105648.J39665@delplex.bde.org> X-Operating-System: FreeBSD 6.0-STABLE i386 Organization: BSDMon X-GPG-Key: http://www.bsdmon.com/public_key.gpg User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at bsdmon.com Cc: freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/91134: [PATCH] Preserve access and modification time when cp to a smbfs destination path X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2006 19:28:04 -0000 --6Nae48J/T25AfBN4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 01, 2006 at 11:06:48AM +1100, Bruce Evans wrote: > On Sat, 31 Dec 2005, Gilbert Cao wrote: >=20 > >>Fix: > >The following patch has fixed the problem as I have finally found the=20 > >problem in > >the src/bin/cp source code, especially the utils.c file : > >I have found out that utimes() does nothing on the newly created file, i= f=20 > >its > >file descriptor is not closed yet, and this is only the case in a SMB=20 > >destination path. >=20 > This is a bug in smbfs. cp only works on POSIX file systems. OK. >=20 > It can't be right to always close the file. This leaves the fd >=3D 0 ca= se > in setfile() unused and bogotifies all the code that handles this case, > even for POSIX file systems where this code just works. However, I can't > see any reason to have the fd >=3D 0 case except to avoid minor races for > regular files only. I guess I will maintain my own version of cp, until the bug in smbfs will be correct, right ? I don't know if I will be qualified enough to debug smbfs ;) >=20 > Bruce --=20 -------------------------------- (hika) Gilbert Cao http://www.miaouirc.com - MiaouIRC Project 2002-2003 http://www.bsdmon.com - The BSD DMON Power to serve IRC : #miaule at IRCNET Network -------------------------------- --6Nae48J/T25AfBN4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDuX6WSyQfFTqAEpcRApx9AKC0D3Vw4857cfZzIcsRo3v/JpLuNwCeKUj6 p2CJJm7CAzbrkDYL+qCG0sk= =VeT2 -----END PGP SIGNATURE----- --6Nae48J/T25AfBN4--