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-prev] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2008 12:36:41 +0900
From:	hooanon05@...oo.co.jp
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
	Christoph Hellwig <hch@....de>,
	bugme-daemon@...zilla.kernel.org,
	lasse-kernelbug-2008@...l.plastictree.net
Subject: Re: [Bugme-new] [Bug 10276] New: directory ctime not updated by rename 


Al Viro:
> The latter; all control over timestamps on directory operations is in
> filesystems.  Which filesystem it is, BTW?  E.g. ext2 has
>         dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
> in ext2_set_link() (and the same in ext2_add_entry()/ext2_delete_entry()),
> so on all paths in ext2_rename() both parents will get ctime and mtime
> updated; so will the object being moved and the object being unlinked
> (explicitly in ext2_rename()).

Is it correct to update the mtime of renaming inode?
When it is a regular file the mtime is not updated, but a directory. I
have been wondering it for a long time.

$ stat -f .
  File: "."
    ID: c39e8aabce296ceb Namelen: 255     Type: ext2/ext3
Block size: 1024       Fundamental block size: 1024
Blocks: Total: 124442     Free: 122443     Available: 116018
Inodes: Total: 32256      Free: 32144
(actually it is ext2)

$ mkdir d1
$ stat d1
  File: `d1'
  Size: 1024      	Blocks: 2          IO Block: 1024   directory
Device: 30ah/778d	Inode: 2017        Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/     jro)   Gid: ( 1000/     jro)
Access: 2008-03-20 12:33:57.000000000 +0900
Modify: 2008-03-20 12:33:57.000000000 +0900
Change: 2008-03-20 12:33:57.000000000 +0900

$ /tmp/rename d1 d2
(simply issues rename systemcall.)

$ stat d2
  File: `d2'
  Size: 1024      	Blocks: 2          IO Block: 1024   directory
Device: 30ah/778d	Inode: 2017        Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/     jro)   Gid: ( 1000/     jro)
Access: 2008-03-20 12:33:57.000000000 +0900
Modify: 2008-03-20 12:34:11.000000000 +0900
Change: 2008-03-20 12:34:11.000000000 +0900
$ 


Junjiro Okajima
--
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