lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080318100023.1e047627.akpm@linux-foundation.org>
Date:	Tue, 18 Mar 2008 10:00:23 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
	Christoph Hellwig <hch@....de>,
	Al Viro <viro@...IV.linux.org.uk>
Cc:	bugme-daemon@...zilla.kernel.org,
	lasse-kernelbug-2008@...l.plastictree.net
Subject: Re: [Bugme-new] [Bug 10276] New: directory ctime not updated by
 rename

On Tue, 18 Mar 2008 09:11:54 -0700 (PDT) bugme-daemon@...zilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=10276
> 
>            Summary: directory ctime not updated by rename
>            Product: File System
>            Version: 2.5
>      KernelVersion: 2.6.24.3
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: ext3
>         AssignedTo: akpm@...l.org
>         ReportedBy: lasse-kernelbug-2008@...l.plastictree.net
> 
> 
> Latest working kernel version:
> Earliest failing kernel version:
> Distribution: LFS
> Hardware Environment: 32bit x86
> Software Environment:
> Problem Description: Renaming a file into a directory so that an already
> existing file is overwritten, will not update the ctime on the directory. This
> seems to be the reason for certain failures with incremental backups (e.g.,
> with star).
> 
> Steps to reproduce:
> 
> Run the following commands and watch the output from stat. Upon the second run
> of rename, the ctime is not updated on the directory sub.
> 
> rm -fr sub new &&
> mkdir sub &&
> stat sub &&
> sleep 2 &&
> echo running rename &&
> ./rename a &&
> stat sub &&
> sleep 2 &&
> echo running rename again &&
> ./rename b &&
> stat sub
> 
> 
> Here is rename.c:
> 
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/stat.h>
> 
> int main(int argc, char** argv) {
>         int fd;
> 
>         fd = open("new", O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);        
>         write(fd, argv[1], 1);
>         close(fd);
>         rename("new", "sub/x");
> 
>         return 0;
> }
> 

Do we agree that this is a bug?  If so, is it a VFS thing or a per-fs
thing?

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ