projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hwrng: omap3-rom - Remove obsoleted functions
[cascardo/linux.git]
/
fs
/
posix_acl.c
diff --git
a/fs/posix_acl.c
b/fs/posix_acl.c
index
edc452c
..
59d47ab
100644
(file)
--- a/
fs/posix_acl.c
+++ b/
fs/posix_acl.c
@@
-205,7
+205,7
@@
posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
* Check if an acl is valid. Returns 0 if it is, or -E... otherwise.
*/
int
* Check if an acl is valid. Returns 0 if it is, or -E... otherwise.
*/
int
-posix_acl_valid(const struct posix_acl *acl)
+posix_acl_valid(
struct user_namespace *user_ns,
const struct posix_acl *acl)
{
const struct posix_acl_entry *pa, *pe;
int state = ACL_USER_OBJ;
{
const struct posix_acl_entry *pa, *pe;
int state = ACL_USER_OBJ;
@@
-225,7
+225,7
@@
posix_acl_valid(const struct posix_acl *acl)
case ACL_USER:
if (state != ACL_USER)
return -EINVAL;
case ACL_USER:
if (state != ACL_USER)
return -EINVAL;
- if (!
uid_valid(
pa->e_uid))
+ if (!
kuid_has_mapping(user_ns,
pa->e_uid))
return -EINVAL;
needs_mask = 1;
break;
return -EINVAL;
needs_mask = 1;
break;
@@
-240,7
+240,7
@@
posix_acl_valid(const struct posix_acl *acl)
case ACL_GROUP:
if (state != ACL_GROUP)
return -EINVAL;
case ACL_GROUP:
if (state != ACL_GROUP)
return -EINVAL;
- if (!
gid_valid(
pa->e_gid))
+ if (!
kgid_has_mapping(user_ns,
pa->e_gid))
return -EINVAL;
needs_mask = 1;
break;
return -EINVAL;
needs_mask = 1;
break;
@@
-834,7
+834,7
@@
set_posix_acl(struct inode *inode, int type, struct posix_acl *acl)
return -EPERM;
if (acl) {
return -EPERM;
if (acl) {
- int ret = posix_acl_valid(acl);
+ int ret = posix_acl_valid(
inode->i_sb->s_user_ns,
acl);
if (ret)
return ret;
}
if (ret)
return ret;
}