Message ID | 1650856181-21350-2-git-send-email-xuyang2018.jy@fujitsu.com |
---|---|
State | Superseded |
Headers | show |
Series | [v6,1/4] fs: move sgid strip operation from inode_init_owner into inode_sgid_strip | expand |
diff --git a/fs/namei.c b/fs/namei.c index 509657fdf4f5..73646e28fae0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3521,6 +3521,8 @@ struct dentry *vfs_tmpfile(struct user_namespace *mnt_userns, child = d_alloc(dentry, &slash_name); if (unlikely(!child)) goto out_err; + if (!IS_POSIXACL(dir)) + mode &= ~current_umask(); error = dir->i_op->tmpfile(mnt_userns, dir, child, mode); if (error) goto out_err;