aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index e4369d86e588..7cd71cea0503 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2946,7 +2946,8 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
2946 ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET)) 2946 ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET))
2947 return dentry_has_perm(cred, dentry, FILE__SETATTR); 2947 return dentry_has_perm(cred, dentry, FILE__SETATTR);
2948 2948
2949 if (selinux_policycap_openperm && (ia_valid & ATTR_SIZE)) 2949 if (selinux_policycap_openperm && (ia_valid & ATTR_SIZE)
2950 && !(ia_valid & ATTR_FILE))
2950 av |= FILE__OPEN; 2951 av |= FILE__OPEN;
2951 2952
2952 return dentry_has_perm(cred, dentry, av); 2953 return dentry_has_perm(cred, dentry, av);