diff options
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/security.c b/security/security.c index 1b798d3df710..739e40362f44 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -513,6 +513,15 @@ int security_inode_permission(struct inode *inode, int mask) | |||
513 | return security_ops->inode_permission(inode, mask); | 513 | return security_ops->inode_permission(inode, mask); |
514 | } | 514 | } |
515 | 515 | ||
516 | int security_inode_exec_permission(struct inode *inode, unsigned int flags) | ||
517 | { | ||
518 | if (unlikely(IS_PRIVATE(inode))) | ||
519 | return 0; | ||
520 | if (flags) | ||
521 | return -ECHILD; | ||
522 | return security_ops->inode_permission(inode, MAY_EXEC); | ||
523 | } | ||
524 | |||
516 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr) | 525 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr) |
517 | { | 526 | { |
518 | if (unlikely(IS_PRIVATE(dentry->d_inode))) | 527 | if (unlikely(IS_PRIVATE(dentry->d_inode))) |
@@ -977,8 +986,7 @@ EXPORT_SYMBOL(security_inode_getsecctx); | |||
977 | 986 | ||
978 | #ifdef CONFIG_SECURITY_NETWORK | 987 | #ifdef CONFIG_SECURITY_NETWORK |
979 | 988 | ||
980 | int security_unix_stream_connect(struct socket *sock, struct socket *other, | 989 | int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk) |
981 | struct sock *newsk) | ||
982 | { | 990 | { |
983 | return security_ops->unix_stream_connect(sock, other, newsk); | 991 | return security_ops->unix_stream_connect(sock, other, newsk); |
984 | } | 992 | } |