lkml.org 
[lkml]   [2023]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2023-09-19 15:10    [W:0.028 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site