Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Jeremy Allison <jra@samba.org>
To: Steve French <smfrench@gmail.com>
Cc: Julian Sikorski <belegdol@gmail.com>, CIFS <linux-cifs@vger.kernel.org>
Subject: Re: Permission denied when chainbuilding packages with mock
Date: Sun, 7 Nov 2021 17:46:30 -0800	[thread overview]
Message-ID: <YYiBdmhpfWa7l86J@jeremy-acer> (raw)
In-Reply-To: <CAH2r5mvrPj5b460CeRT9+MNc1fOzwMixqsCN82v8KP_d+bgO2w@mail.gmail.com>

On Sun, Nov 07, 2021 at 04:50:21PM -0600, Steve French wrote:
>That is interesting ... and weird.   Why would POSIX allow doing
>something write related (fsync) without write permission?

It's not POSIX, it's Linux :-).

It also operates on meta-data, so if the buffer cache
has any pending changes on a read-only fd, then fsync(fd)
will flush them.

man 2 fsync.

..
        As well as flushing the file data, fsync() also  flushes  the  metadata
        information associated with the file (see inode(7)).

I think cifsfs needs to keep track of the file modes
and silently return success on a read-only fd even
if mounted without nostrictsync.

  parent reply	other threads:[~2021-11-08  1:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 21:10 Permission denied when chainbuilding packages with mock Julian Sikorski
2021-11-07 21:44 ` Jeremy Allison
2021-11-07 21:49   ` Jeremy Allison
2021-11-07 22:03     ` Jeremy Allison
2021-11-07 22:15     ` Julian Sikorski
2021-11-07 22:47       ` Jeremy Allison
2021-11-07 22:50         ` Steve French
2021-11-07 22:55           ` Julian Sikorski
2021-11-08  1:46           ` Jeremy Allison [this message]
2021-11-07 22:51         ` Julian Sikorski
2021-11-08  1:48           ` Jeremy Allison
2021-11-08  6:59             ` Julian Sikorski
2021-11-08 15:52               ` Julian Sikorski
2021-11-08 16:46               ` Jeremy Allison
2021-11-09  8:10                 ` Steve French
2021-11-09  9:26                   ` Julian Sikorski
2021-11-10  0:54                     ` Jeremy Allison
2021-11-10  7:56                       ` Steve French
2021-11-10 11:23                         ` Julian Sikorski
2021-11-13 15:37                           ` Julian Sikorski
2021-11-15  3:25                             ` Steve French
2021-11-15  7:10                               ` Julian Sikorski
2021-11-09 19:25                   ` Jeremy Allison
  -- strict thread matches above, loose matches on Subject: below --
2021-11-07 15:44 Julian Sikorski

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=YYiBdmhpfWa7l86J@jeremy-acer \
    --to=jra@samba.org \
    --cc=belegdol@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /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