aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index ed95401970c7..1ac42475ea08 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -795,8 +795,9 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
795 * @unix_stream_connect: 795 * @unix_stream_connect:
796 * Check permissions before establishing a Unix domain stream connection 796 * Check permissions before establishing a Unix domain stream connection
797 * between @sock and @other. 797 * between @sock and @other.
798 * @sock contains the socket structure. 798 * @sock contains the sock structure.
799 * @other contains the peer socket structure. 799 * @other contains the peer sock structure.
800 * @newsk contains the new sock structure.
800 * Return 0 if permission is granted. 801 * Return 0 if permission is granted.
801 * @unix_may_send: 802 * @unix_may_send:
802 * Check permissions before connecting or sending datagrams from @sock to 803 * Check permissions before connecting or sending datagrams from @sock to
@@ -1567,8 +1568,7 @@ struct security_operations {
1567 int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); 1568 int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen);
1568 1569
1569#ifdef CONFIG_SECURITY_NETWORK 1570#ifdef CONFIG_SECURITY_NETWORK
1570 int (*unix_stream_connect) (struct socket *sock, 1571 int (*unix_stream_connect) (struct sock *sock, struct sock *other, struct sock *newsk);
1571 struct socket *other, struct sock *newsk);
1572 int (*unix_may_send) (struct socket *sock, struct socket *other); 1572 int (*unix_may_send) (struct socket *sock, struct socket *other);
1573 1573
1574 int (*socket_create) (int family, int type, int protocol, int kern); 1574 int (*socket_create) (int family, int type, int protocol, int kern);
@@ -2531,8 +2531,7 @@ static inline int security_inode_getsecctx(struct inode *inode, void **ctx, u32
2531 2531
2532#ifdef CONFIG_SECURITY_NETWORK 2532#ifdef CONFIG_SECURITY_NETWORK
2533 2533
2534int security_unix_stream_connect(struct socket *sock, struct socket *other, 2534int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk);
2535 struct sock *newsk);
2536int security_unix_may_send(struct socket *sock, struct socket *other); 2535int security_unix_may_send(struct socket *sock, struct socket *other);
2537int security_socket_create(int family, int type, int protocol, int kern); 2536int security_socket_create(int family, int type, int protocol, int kern);
2538int security_socket_post_create(struct socket *sock, int family, 2537int security_socket_post_create(struct socket *sock, int family,
@@ -2573,8 +2572,8 @@ void security_tun_dev_post_create(struct sock *sk);
2573int security_tun_dev_attach(struct sock *sk); 2572int security_tun_dev_attach(struct sock *sk);
2574 2573
2575#else /* CONFIG_SECURITY_NETWORK */ 2574#else /* CONFIG_SECURITY_NETWORK */
2576static inline int security_unix_stream_connect(struct socket *sock, 2575static inline int security_unix_stream_connect(struct sock *sock,
2577 struct socket *other, 2576 struct sock *other,
2578 struct sock *newsk) 2577 struct sock *newsk)
2579{ 2578{
2580 return 0; 2579 return 0;