Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2006 20:27:19 +0100
From:      Gilbert Cao <hika@bsdmon.com>
To:        Bruce Evans <bde@zeta.org.au>
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
Message-ID:  <20060102192719.GC1030@bsdmon.com>
In-Reply-To: <20060101105648.J39665@delplex.bde.org>
References:  <20051231112258.C4B72B853@sdf1.bsdmon.com> <20060101105648.J39665@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Sun, Jan 01, 2006 at 11:06:48AM +1100, Bruce Evans wrote:
> On Sat, 31 Dec 2005, Gilbert Cao wrote:
> 
> >>Fix:
> >The following patch has fixed the problem as I have finally found the 
> >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, if 
> >its
> >file descriptor is not closed yet, and this is only the case in a SMB 
> >destination path.
> 
> This is a bug in smbfs.  cp only works on POSIX file systems.

OK.

> 
> It can't be right to always close the file.  This leaves the fd >= 0 case
> 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 >= 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 ;)

> 
> Bruce

-- 
--------------------------------
 (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
--------------------------------

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDuX6WSyQfFTqAEpcRApx9AKC0D3Vw4857cfZzIcsRo3v/JpLuNwCeKUj6
p2CJJm7CAzbrkDYL+qCG0sk=
=VeT2
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060102192719.GC1030>