Re: [PATCH] fs/posix_acl: apply umask if superblock disables ACL support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux