mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
userns: rename is_owner_or_cap to inode_owner_or_capable
And give it a kernel-doc comment. [[email protected]: btrfs changed in linux-next] Signed-off-by: Serge E. Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Daniel Lezcano <[email protected]> Acked-by: David Howells <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e795b71799
commit
2e14967075
30 changed files with 47 additions and 44 deletions
|
|
@ -406,7 +406,7 @@ ext2_xattr_set_acl(struct dentry *dentry, const char *name, const void *value,
|
|||
return -EINVAL;
|
||||
if (!test_opt(dentry->d_sb, POSIX_ACL))
|
||||
return -EOPNOTSUPP;
|
||||
if (!is_owner_or_cap(dentry->d_inode))
|
||||
if (!inode_owner_or_capable(dentry->d_inode))
|
||||
return -EPERM;
|
||||
|
||||
if (value) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!is_owner_or_cap(inode)) {
|
||||
if (!inode_owner_or_capable(inode)) {
|
||||
ret = -EACCES;
|
||||
goto setflags_out;
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ setflags_out:
|
|||
case EXT2_IOC_GETVERSION:
|
||||
return put_user(inode->i_generation, (int __user *) arg);
|
||||
case EXT2_IOC_SETVERSION:
|
||||
if (!is_owner_or_cap(inode))
|
||||
if (!inode_owner_or_capable(inode))
|
||||
return -EPERM;
|
||||
ret = mnt_want_write(filp->f_path.mnt);
|
||||
if (ret)
|
||||
|
|
@ -115,7 +115,7 @@ setflags_out:
|
|||
if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode))
|
||||
return -ENOTTY;
|
||||
|
||||
if (!is_owner_or_cap(inode))
|
||||
if (!inode_owner_or_capable(inode))
|
||||
return -EACCES;
|
||||
|
||||
if (get_user(rsv_window_size, (int __user *)arg))
|
||||
|
|
|
|||
Loading…
Reference in a new issue