|
@@ -2717,7 +2717,7 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
|
|
ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET))
|
|
ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET))
|
|
return dentry_has_perm(cred, dentry, FILE__SETATTR);
|
|
return dentry_has_perm(cred, dentry, FILE__SETATTR);
|
|
|
|
|
|
- if (ia_valid & ATTR_SIZE)
|
|
|
|
|
|
+ if (selinux_policycap_openperm && (ia_valid & ATTR_SIZE))
|
|
av |= FILE__OPEN;
|
|
av |= FILE__OPEN;
|
|
|
|
|
|
return dentry_has_perm(cred, dentry, av);
|
|
return dentry_has_perm(cred, dentry, av);
|