From: "Theodore Ts'o" <tytso@mit.edu>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: David Howells <dhowells@redhat.com>,
Max Kellermann <max.kellermann@ionos.com>,
Jan Kara <jack@suse.com>, Christian Brauner <brauner@kernel.org>,
linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: Don't reduce symlink i_mode by umask if no ACL support
Date: Thu, 9 May 2024 10:27:58 -0400 [thread overview]
Message-ID: <20240509142758.GG3620298@mit.edu> (raw)
In-Reply-To: <CAJfpegtJbDc=uqpP-KKKpP0da=vkxcCExpNDBHwOdGj-+MsowQ@mail.gmail.com>
On Thu, May 09, 2024 at 03:47:27PM +0200, Miklos Szeredi wrote:
> On Thu, 9 May 2024 at 15:41, David Howells <dhowells@redhat.com> wrote:
>
> > diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h
> > index ef4c19e5f570..566625286442 100644
> > --- a/fs/ext4/acl.h
> > +++ b/fs/ext4/acl.h
> > @@ -71,7 +71,8 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
> > /* usually, the umask is applied by posix_acl_create(), but if
> > ext4 ACL support is disabled at compile time, we need to do
> > it here, because posix_acl_create() will never be called */
> > - inode->i_mode &= ~current_umask();
> > + if (!S_ISLNK(inode->i_mode))
> > + inode->i_mode &= ~current_umask();
>
> I think this should just be removed unconditionally, since the VFS now
> takes care of mode masking in vfs_prepare_mode().
The following is in the ext4 tree:
commit c77194965dd0dcc26f9c1671d2e74e4eb1248af5
Author: Max Kellermann <max.kellermann@ionos.com>
Date: Fri Mar 15 15:29:56 2024 +0100
Revert "ext4: apply umask if ACL support is disabled"
This reverts commit 484fd6c1de13b336806a967908a927cc0356e312. The
commit caused a regression because now the umask was applied to
symlinks and the fix is unnecessary because the umask/O_TMPFILE bug
has been fixed somewhere else already.
Fixes: https://lore.kernel.org/lkml/28DSITL9912E1.2LSZUVTGTO52Q@mforney.org/
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Tested-by: Michael Forney <mforney@mforney.org>
Link: https://lore.kernel.org/r/20240315142956.2420360-1-max.kellermann@ionos.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
prev parent reply other threads:[~2024-05-09 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 13:41 [PATCH] ext4: Don't reduce symlink i_mode by umask if no ACL support David Howells
2024-05-09 13:47 ` Miklos Szeredi
2024-05-09 14:07 ` David Howells
2024-05-09 14:10 ` Miklos Szeredi
2024-05-10 11:38 ` Christian Brauner
2024-05-09 14:27 ` Theodore Ts'o [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=20240509142758.GG3620298@mit.edu \
--to=tytso@mit.edu \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=max.kellermann@ionos.com \
--cc=miklos@szeredi.hu \
/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