Message ID | 1650856181-21350-2-git-send-email-xuyang2018.jy@fujitsu.com |
---|---|
State | Accepted |
Commit | ac6800e279a22b28f4fc21439843025a0d5bf03e |
Headers | show |
Series | None | 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;