cannot create .hosts.b0WX1x : File exists
dwd at bell-labs.com
Fri Nov 30 09:58:29 EST 2001
On Thu, Nov 29, 2001 at 11:46:30PM +0100, Rok Krulec wrote:
> Hello Dave,
> On Thu, 29 Nov 2001, Dave Dykstra wrote:
> > What version of rsync are you using? The "cannot create" message is coming
> > from receiver.c. Assuming you're using a released version of rsync and not
> > a development version, it appears that the mktemp library call is creating
> > the file and rsync isn't expecting that. Are you sure the Linuxes are
> > exactly the same; do you perhaps have a different version of libc on that
> > one machine (I'm guessing that maybe mktemp has been changed to create the
> > file instead of just returning its name)? Andrew Tridgell changed the
> > relevant section of code in the development version of rsync 6 months ago
> > to use mkstemp (when configure determines it to be secure) instead of
> > mktemp but he didn't say why.
> This is it. All working machines have 2.2 lnx kernel and libc-2.1.3.so
> nonworking one has 2.4 lnx kernel and libc-2.2.1.so.
> I changed line 121 of syscall.c to use:
> instead of
> I got his linker warning, but rsync was linked OK and is working fine now.
> syscall.o: In function `do_mktemp':
> syscall.o(.text+0x32f): the use of `mktemp' is dangerous, better use `mkstemp'
> Dave, thank You for Your help. You guys are really great.
What version of sources is that which had mkstemp at line 121 of
syscall.c? It's surprising that you could just replace one with the other,
as mkstemp is supposed to open the file and mktemp is not supposed to. It
sounds like you have some inconsistent version of the sources.
More information about the rsync