[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230919-verweben-signieren-5c69a314440c@brauner>
Date: Tue, 19 Sep 2023 15:10:10 +0200
From: Christian Brauner <brauner@...nel.org>
To: Max Kellermann <max.kellermann@...os.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
"J . Bruce Fields" <bfields@...hat.com>, stable@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/posix_acl: apply umask if superblock disables ACL
support
On Tue, Sep 19, 2023 at 10:18:07AM +0200, Max Kellermann wrote:
> The function posix_acl_create() applies the umask only if the inode
> has no ACL (= NULL) or if ACLs are not supported by the filesystem
> driver (= -EOPNOTSUPP).
>
> However, this happens only after after the IS_POSIXACL() check
> succeeded. If the superblock doesn't enable ACL support, umask will
> never be applied. A filesystem which has no ACL support will of
> course not enable SB_POSIXACL, rendering the umask-applying code path
> unreachable.
The fix is in the wrong place if !IS_POSIXACL() umask stripping happens
in the VFS. So if at all we need to fix stripping umask for O_TMPFILE in
the vfs.
Have you verified that commit ac6800e279a2 ("fs: Add missing umask strip
in vfs_tmpfile") doesn't already fix this?
Powered by blists - more mailing lists