linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: ecryptfs@vger.kernel.org,
	Salvatore Bonaccorso <carnil@debian.org>,
	Elliott Mitchell <ehem+debian@m5p.com>,
	962254@bugs.debian.org,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Miklos Szeredi <mszeredi@redhat.com>
Subject: Re: Umask ignored when mounting NFSv4.2 share of an exported Filesystem with noacl (was: Re: Bug#962254: NFS(v4) broken at 4.19.118-2)
Date: Wed, 17 Jun 2020 18:50:04 +0200	[thread overview]
Message-ID: <CAHc6FU5-WGL8OwELQvpu8CsQgqW5o2h92UG3d2E3RUTPnBPgog@mail.gmail.com> (raw)
In-Reply-To: <20200617153107.GL266716@pick.fieldses.org>

On Wed, Jun 17, 2020 at 5:31 PM J. Bruce Fields <bfields@redhat.com> wrote:
>
> On Wed, Jun 17, 2020 at 04:42:56PM +0200, Andreas Gruenbacher wrote:
> > Hi Bruce,
> >
> > On Wed, Jun 17, 2020 at 2:58 AM J. Bruce Fields <bfields@redhat.com> wrote:
> > > I think I'll send the following upstream.
> >
> > looking good, but how about using a little helper for this?
>
> I like it.  And the new comment's helpful too.
>
> >
> > Also I'm not sure if ecryptfs gets this right, so taking the ecryptfs
> > list into the CC.
>
> Yes, questions I had while doing this:
>
>         - cachefiles, ecrypfs, devtmpfs, and unix_mknod skip the check,
>           is that OK for all of them?  (Overlayfs too, I think?--that
>           code's harder to follow.
>
>         - why don't vfs_{create,mknod,mkdir} do the IS_POSIXACL check
>           themselves?  Even if it's unnecessary for some callers, surely
>           it wouldn't be wrong?

That's a good question. The security_path_{mkdir,mknod} hooks would
then probably be passed the original create mode before applying the
umask, but at that point it's not clear what the new inode's final
mode will be, anyway.

> I also wondered why both vfs_{create,mknod,mkdir} and the callers were
> calling security hooks, but now I see that the callers are calling
> security_path_* hooks and the vfs_ functions are calling
> security_inode_* hooks, so I guess they're not redundant.
>
> Though now I wonder why some of the callers (nfsd, overlayfs) are
> skipping the security_path_* hooks.

The path based security hooks are only used by apparmor and tomoyo.
Those hooks basically control who (which process) can do what where in
the filesystem, but nfsd isn't aware of the "who", and overlayfs is a
layer below the "where".

Andreas


  reply	other threads:[~2020-06-17 16:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200605051607.GA34405@mattapan.m5p.com>
     [not found] ` <20200605064426.GA1538868@eldamar.local>
     [not found]   ` <20200605174349.GA40135@mattapan.m5p.com>
     [not found]     ` <20200605183631.GA1720057@eldamar.local>
     [not found]       ` <20200611223711.GA37917@mattapan.m5p.com>
2020-06-13 12:54         ` Umask ignored when mounting NFSv4.2 share of an exported ZFS (with acltype=off) (was: Re: Bug#962254: NFS(v4) broken at 4.19.118-2) Salvatore Bonaccorso
2020-06-13 18:45           ` Elliott Mitchell
2020-06-15 14:50             ` J. Bruce Fields
2020-06-15 18:53               ` Umask ignored when mounting NFSv4.2 share of an exported Filesystem with noacl " Salvatore Bonaccorso
2020-06-16  2:38                 ` J. Bruce Fields
2020-06-16  2:42                   ` J. Bruce Fields
2020-06-16  5:32                     ` Salvatore Bonaccorso
2020-06-16 16:16                     ` Salvatore Bonaccorso
2020-06-17  0:58                       ` J. Bruce Fields
2020-06-17  4:58                         ` Umask ignored when mounting NFSv4.2 share of an exported Filesystem with noacl Salvatore Bonaccorso
2020-06-17 12:46                           ` J. Bruce Fields
2020-06-17 14:42                       ` Umask ignored when mounting NFSv4.2 share of an exported Filesystem with noacl (was: Re: Bug#962254: NFS(v4) broken at 4.19.118-2) Andreas Gruenbacher
2020-06-17 15:31                         ` J. Bruce Fields
2020-06-17 16:50                           ` Andreas Gruenbacher [this message]
2020-06-16  5:28                   ` Salvatore Bonaccorso
2020-06-16  1:57               ` Umask ignored when mounting NFSv4.2 share of an exported ZFS (with acltype=off) " Elliott Mitchell
2020-06-15 11:55           ` Christoph Hellwig

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=CAHc6FU5-WGL8OwELQvpu8CsQgqW5o2h92UG3d2E3RUTPnBPgog@mail.gmail.com \
    --to=agruenba@redhat.com \
    --cc=962254@bugs.debian.org \
    --cc=bfields@redhat.com \
    --cc=carnil@debian.org \
    --cc=ecryptfs@vger.kernel.org \
    --cc=ehem+debian@m5p.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mszeredi@redhat.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;
as well as URLs for NNTP newsgroup(s).