From: Salvatore Bonaccorso <carnil@debian.org>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: Elliott Mitchell <ehem+debian@m5p.com>,
962254@bugs.debian.org, linux-nfs@vger.kernel.org,
agruenba@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: Tue, 16 Jun 2020 07:32:24 +0200 [thread overview]
Message-ID: <20200616053224.GB19246@lorien.valinor.li> (raw)
In-Reply-To: <20200616024212.GC214986@pick.fieldses.org>
On Mon, Jun 15, 2020 at 10:42:12PM -0400, J. Bruce Fields wrote:
> On Mon, Jun 15, 2020 at 10:38:20PM -0400, J. Bruce Fields wrote:
> > Thanks for the detailed reproducer.
> >
> > It's weird, as the server is basically just setting the transmitted
> > umask and then calling into the vfs to handle the rest, so it's not much
> > different from any other user. But the same reproducer run just on the
> > ext4 filesystem does give the right permissions....
> >
> > Oh, but looking at the system call, fs_namei.c:do_mkdirat(), it does:
> >
> > if (!IS_POSIXACL(path.dentry->d_inode))
> > mode &= ~current_umask();
> > error = security_path_mkdir(&path, dentry, mode);
> > if (!error)
> > error = vfs_mkdir(path.dentry->d_inode, dentry, mode);
> >
> > whereas nfsd just calls into vfs_mkdir().
> >
> > And that IS_POSIXACL() check is exactly a check whether the filesystem
> > supports ACLs. So I guess it's the responsibility of the caller of
> > vfs_mkdir() to handle that case.
>
> But, that's unsatisfying: why isn't vfs_mkdir() taking care of this
> itself? And what about that security_path_mkdir() call? And are the
> other cases of that switch in fs/nfsd/vfs.c:nfsd_create_locked()
> correct? I think there may be some more cleanup here called for, I'll
> poke around tomorrow.
Yes agreed and can confirm: The other cases in
fs/nfsd/vfs.c:nfsd_create_locked() seem to have the problem as well.
Regards,
Salvatore
next prev parent reply other threads:[~2020-06-16 5:32 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 [this message]
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
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=20200616053224.GB19246@lorien.valinor.li \
--to=carnil@debian.org \
--cc=962254@bugs.debian.org \
--cc=agruenba@redhat.com \
--cc=bfields@redhat.com \
--cc=ehem+debian@m5p.com \
--cc=linux-nfs@vger.kernel.org \
/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).