mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
vfs: atomic_open(): fix create mode usage
Don't mask S_ISREG off the create mode before passing to ->atomic_open(). Other methods (->create, ->mknod) also get the complete file mode and filesystems expect it. Reported-by: Steve <steveamigauk@yahoo.co.uk> Reported-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Tested-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
parent
e68726ff72
commit
62b259d8b3
@ -2414,7 +2414,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
|
||||
goto out;
|
||||
}
|
||||
|
||||
mode = op->mode & S_IALLUGO;
|
||||
mode = op->mode;
|
||||
if ((open_flag & O_CREAT) && !IS_POSIXACL(dir))
|
||||
mode &= ~current_umask();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user