bin/91134: [PATCH] Preserve access and modification time when
cp to a smbfs destination path
Gilbert Cao
hika at bsdmon.com
Mon Jan 2 11:30:11 PST 2006
The following reply was made to PR bin/91134; it has been noted by GNATS.
From: Gilbert Cao <hika at bsdmon.com>
To: Bruce Evans <bde at zeta.org.au>
Cc: FreeBSD-gnats-submit at freebsd.org, freebsd-bugs at freebsd.org
Subject: Re: bin/91134: [PATCH] Preserve access and modification time when cp to a smbfs destination path
Date: Mon, 2 Jan 2006 20:27:19 +0100
--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--
More information about the freebsd-bugs
mailing list