mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ragnar Hojland Espinosa <ragnar@jazzfree.com>
To: Thomas Habets <thomas@habets.pp.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mtime changeable on immutable files (a bug, isn't it?)
Date: Tue, 26 Mar 2002 20:26:16 +0100	[thread overview]
Message-ID: <20020326202616.C2539@ragnar-hojland.com> (raw)
In-Reply-To: <02032519245700.00785@marvin>

On Mon, Mar 25, 2002 at 07:24:57PM +0100, Thomas Habets wrote:
> You can touch(1) an immutable file, which changes its mtime. Since you can't
> change the permission bits of the inode, you shouldn't be able to change the
> mtime, correct?

You could reason that since the immutable flag is set at i_mode, and i_mode
stores file modes, it should be legal to change the inode (mtime) as long as
you do not change the contents of the file.

Or at least that that would be the intention of chattr, if you re-read the
page:

       A  file with the i' attribute cannot be modified: it can<AD>
       not be deleted or renamed, no link can be created to  this
       file  and  no  data  can  be written to the file. Only the
       superuser can set or clear this attribute.

Even if you obviate the inode/file difference, by changing mtime you aren't
either deleting, renaming, linking or writing data to the file, so you are
consistent to the pubished documentation.
-- 
____/|  Ragnar Højland      Freedom - Linux - OpenGL |    Brainbench MVP
\ o.O|  PGP94C4B2F0D27DE025BE2302C104B78C56 B72F0822 | for Unix Programming
 =(_)=  "Thou shalt not follow the NULL pointer for  | (www.brainbench.com)
   U     chaos and madness await thee at its end."      [15 pend. Mar 10]

      reply	other threads:[~2002-03-26 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-25 18:24 Thomas Habets
2002-03-26 19:26 ` Ragnar Hojland Espinosa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020326202616.C2539@ragnar-hojland.com \
    --to=ragnar@jazzfree.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@habets.pp.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®