mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: ANDROID: fuse: Fix umasking in backing
We should only apply the mask ourselves if we're not
using POSIX acls
Bug: 215212818
Test: com.android.cts.externalstorageapp.CommonExternalStorageTest
#testAllPackageDirsWritable, verify files and cache permissions
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: If105afe62a60b93cbce1ca5ab5caf11f008aa7db
This commit is contained in:
parent
7009f91924
commit
e8914c1be5
1 changed files with 8 additions and 2 deletions
|
|
@ -1091,8 +1091,11 @@ int fuse_mknod_backing(
|
|||
return -EBADF;
|
||||
|
||||
inode_lock_nested(backing_inode, I_MUTEX_PARENT);
|
||||
mode = fmi->mode;
|
||||
if (!IS_POSIXACL(backing_inode))
|
||||
mode &= ~fmi->umask;
|
||||
err = vfs_mknod(backing_inode, backing_path.dentry,
|
||||
fmi->mode & ~fmi->umask, new_decode_dev(fmi->rdev));
|
||||
mode, new_decode_dev(fmi->rdev));
|
||||
inode_unlock(backing_inode);
|
||||
if (err)
|
||||
goto out;
|
||||
|
|
@ -1165,7 +1168,10 @@ int fuse_mkdir_backing(
|
|||
return -EBADF;
|
||||
|
||||
inode_lock_nested(backing_inode, I_MUTEX_PARENT);
|
||||
err = vfs_mkdir(backing_inode, backing_path.dentry, fmi->mode & ~fmi->umask);
|
||||
mode = fmi->mode;
|
||||
if (!IS_POSIXACL(backing_inode))
|
||||
mode &= ~fmi->umask;
|
||||
err = vfs_mkdir(backing_inode, backing_path.dentry, mode);
|
||||
if (err)
|
||||
goto out;
|
||||
if (d_really_is_negative(backing_path.dentry) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue