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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Guilherme de Almeida Suckevicz <guito.linux <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: [PATCH] chmod: change in the inode's st_ctime
Date: Fri, 8 Nov 2013 11:07:32 -0200
[Message part 1 (text/plain, inline)]
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;


I really thank you,
Guilherme Almeida Suckevicz.
[Message part 2 (text/html, inline)]

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.