diff options
Diffstat (limited to 'security/security.c')
| -rw-r--r-- | security/security.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/security/security.c b/security/security.c index 101142369db4..4ba6d4cc061f 100644 --- a/security/security.c +++ b/security/security.c | |||
| @@ -518,16 +518,14 @@ int security_inode_permission(struct inode *inode, int mask) | |||
| 518 | { | 518 | { |
| 519 | if (unlikely(IS_PRIVATE(inode))) | 519 | if (unlikely(IS_PRIVATE(inode))) |
| 520 | return 0; | 520 | return 0; |
| 521 | return security_ops->inode_permission(inode, mask); | 521 | return security_ops->inode_permission(inode, mask, 0); |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | int security_inode_exec_permission(struct inode *inode, unsigned int flags) | 524 | int security_inode_exec_permission(struct inode *inode, unsigned int flags) |
| 525 | { | 525 | { |
| 526 | if (unlikely(IS_PRIVATE(inode))) | 526 | if (unlikely(IS_PRIVATE(inode))) |
| 527 | return 0; | 527 | return 0; |
| 528 | if (flags) | 528 | return security_ops->inode_permission(inode, MAY_EXEC, flags); |
| 529 | return -ECHILD; | ||
| 530 | return security_ops->inode_permission(inode, MAY_EXEC); | ||
| 531 | } | 529 | } |
| 532 | 530 | ||
| 533 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr) | 531 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr) |
