GNU bug report logs - #18499
Possible mv race for hardlinks (rhbz #1141368 )

Previous Next

Package: coreutils;

Reported by: ovasik <at> redhat.com

Date: Thu, 18 Sep 2014 10:54:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Boris Ranto <branto <at> redhat.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 18499 <at> debbugs.gnu.org, ovasik <at> redhat.com, Miklos Szeredi <miklos <at> szeredi.hu>
Subject: bug#18499: Possible mv race for hardlinks (rhbz #1141368 )
Date: Sat, 22 Nov 2014 03:49:33 +0000
[Message part 1 (text/plain, inline)]
I just realised that this change avoids a more problematic issue.
The loss of files on case insensitive file systems supporting hardlinks.
Consider hfs...

  $ truncate -s1G hfs.img
  $ mkfs.hfsplus hfs.img
  $ mkdir hfs
  $ sudo mount hfs.img hfs
  $ sudo su
  # cd hfs
  # touch foo
  # ln foo blah
  # mv foo Foo  # foo is removed!
  # ls -l
  -rw-r--r--. 1 root root 0 Nov 22 02:42 blah

In the attached patch I've added a test case,
removed an old test case that pondered the issue in 5.0.91?,
updated NEWS and mentioned the issue in copy.c

cheers,
Pádraig.
[mv-hardlink-hfs.patch (text/x-patch, attachment)]

This bug report was last modified 10 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.