GNU bug report logs - #15835
[PATCH] chmod: change in the inode's st_ctime

Previous Next

Package: coreutils;

Reported by: Guilherme de Almeida Suckevicz <guito.linux <at> gmail.com>

Date: Fri, 8 Nov 2013 16:49:01 UTC

Severity: normal

Tags: patch, wontfix

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

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: control <at> debbugs.gnu.org
Subject: bug#15835: [PATCH] chmod: change in the inode's st_ctime
Date: Fri, 08 Nov 2013 19:04:44 +0000
tag 15835 wontfix
close 15835
stop

On 11/08/2013 01:07 PM, Guilherme de Almeida Suckevicz wrote:
> Hello,
> 
> I saw this issue on TODO file:
> 
> "Modify chmod so that it does not change an inode's st_ctime
>   when the selected operation would have no other effect.
>   First suggested by Hans Ecke <http://hans.ecke.ws> in
>     http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/2920
>   Discussed more recently on <http://bugs.debian.org/497514>."
> 
> I made a patch just to chmod, for now, to this issue and I would like
> to ask if it need something else or if you can make some comments about
> this patch, I really appreciate.
> 
> 
> --- src/chmod.c    2013-11-08 10:19:48.608214043 -0200
> +++ src/chmod-orig.c    2013-11-08 10:16:30.378505318 -0200
> @@ -266,7 +266,7 @@
>        new_mode = mode_adjust (old_mode, S_ISDIR (old_mode) != 0,
> umask_value,
>                                change, NULL);
> 
> -      if (mode_changed (file, old_mode, new_mode) && ! S_ISLNK (old_mode))
> +      if (! S_ISLNK (old_mode))
>          {
>            if (chmodat (fts->fts_cwd_fd, file, new_mode) == 0)
>              chmod_succeeded = true;

This has been discussed on and off, most recently at:
http://lists.gnu.org/archive/html/coreutils/2013-10/msg00028.html

The current thought is that it would be best done in the kernel,
as in userspace we haven't visibility of side effects of the call.

thanks,
Pádraig.








This bug report was last modified 11 years and 197 days ago.

Previous Next


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