diff options
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 85338f0c0481..0c98846f188d 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2645,6 +2645,8 @@ static int selinux_inode_permission(struct inode *inode, int mask) | |||
2645 | { | 2645 | { |
2646 | const struct cred *cred = current_cred(); | 2646 | const struct cred *cred = current_cred(); |
2647 | 2647 | ||
2648 | mask &= (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND); | ||
2649 | |||
2648 | if (!mask) { | 2650 | if (!mask) { |
2649 | /* No permission to check. Existence test. */ | 2651 | /* No permission to check. Existence test. */ |
2650 | return 0; | 2652 | return 0; |