Lines Matching defs:sock
33 #include <net/sock.h>
476 init_debug("sock blob size = %d\n", blob_sizes.lbs_sock);
4511 int security_netlink_send(struct sock *sk, struct sk_buff *skb)
4518 * @sock: originating sock
4519 * @other: peer sock
4520 * @newsk: new sock
4523 * between @sock and @other.
4537 int security_unix_stream_connect(struct sock *sock, struct sock *other,
4538 struct sock *newsk)
4540 return call_int_hook(unix_stream_connect, sock, other, newsk);
4546 * @sock: originating sock
4547 * @other: peer sock
4549 * Check permissions before connecting or sending datagrams from @sock to
4564 int security_unix_may_send(struct socket *sock, struct socket *other)
4566 return call_int_hook(unix_may_send, sock, other);
4588 * @sock: socket
4598 * and attach security information to SOCK_INODE(sock)->i_security. This hook
4599 * may be used to update the SOCK_INODE(sock)->i_security field with additional
4604 int security_socket_post_create(struct socket *sock, int family,
4607 return call_int_hook(socket_post_create, sock, family, type,
4629 * @sock: socket
4634 * and the socket @sock is bound to the address specified in the @address
4639 int security_socket_bind(struct socket *sock,
4642 return call_int_hook(socket_bind, sock, address, addrlen);
4647 * @sock: socket
4652 * connect socket @sock to a remote address, @address.
4656 int security_socket_connect(struct socket *sock,
4659 return call_int_hook(socket_connect, sock, address, addrlen);
4664 * @sock: socket
4671 int security_socket_listen(struct socket *sock, int backlog)
4673 return call_int_hook(socket_listen, sock, backlog);
4678 * @sock: listening socket
4687 int security_socket_accept(struct socket *sock, struct socket *newsock)
4689 return call_int_hook(socket_accept, sock, newsock);
4694 * @sock: sending socket
4702 int security_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size)
4704 return call_int_hook(socket_sendmsg, sock, msg, size);
4709 * @sock: receiving socket
4718 int security_socket_recvmsg(struct socket *sock, struct msghdr *msg,
4721 return call_int_hook(socket_recvmsg, sock, msg, size, flags);
4726 * @sock: socket
4733 int security_socket_getsockname(struct socket *sock)
4735 return call_int_hook(socket_getsockname, sock);
4740 * @sock: socket
4746 int security_socket_getpeername(struct socket *sock)
4748 return call_int_hook(socket_getpeername, sock);
4753 * @sock: socket
4758 * @sock.
4762 int security_socket_getsockopt(struct socket *sock, int level, int optname)
4764 return call_int_hook(socket_getsockopt, sock, level, optname);
4769 * @sock: socket
4773 * Check permissions before setting the options associated with socket @sock.
4777 int security_socket_setsockopt(struct socket *sock, int level, int optname)
4779 return call_int_hook(socket_setsockopt, sock, level, optname);
4784 * @sock: socket
4787 * Checks permission before all or part of a connection on the socket @sock is
4792 int security_socket_shutdown(struct socket *sock, int how)
4794 return call_int_hook(socket_shutdown, sock, how);
4799 * @sk: destination sock
4809 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
4817 * @sock: socket
4830 int security_socket_getpeersec_stream(struct socket *sock, sockptr_t optval,
4833 return call_int_hook(socket_getpeersec_stream, sock, optval, optlen,
4839 * @sock: socket
4851 int security_socket_getpeersec_dgram(struct socket *sock,
4854 return call_int_hook(socket_getpeersec_dgram, sock, skb, secid);
4859 * lsm_sock_alloc - allocate a composite sock blob
4860 * @sock: the sock that needs a blob
4863 * Allocate the sock blob for all the modules
4867 static int lsm_sock_alloc(struct sock *sock, gfp_t gfp)
4869 return lsm_blob_alloc(&sock->sk_security, blob_sizes.lbs_sock, gfp);
4873 * security_sk_alloc() - Allocate and initialize a sock's LSM blob
4874 * @sk: sock
4883 int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
4896 * security_sk_free() - Free the sock's LSM blob
4897 * @sk: sock
4901 void security_sk_free(struct sock *sk)
4909 * security_sk_clone() - Clone a sock's LSM state
4910 * @sk: original sock
4911 * @newsk: target sock
4915 void security_sk_clone(const struct sock *sk, struct sock *newsk)
4928 void security_sk_classify_flow(const struct sock *sk, struct flowi_common *flic)
4949 * security_sock_graft() - Reconcile LSM state when grafting a sock on a socket
4950 * @sk: sock being grafted
4956 void security_sock_graft(struct sock *sk, struct socket *parent)
4964 * @sk: parent listening sock
4972 int security_inet_conn_request(const struct sock *sk,
4980 * security_inet_csk_clone() - Set new sock LSM state based on request_sock
4981 * @newsk: new sock
4984 * Set that LSM state of @sock using the LSM state from @req.
4986 void security_inet_csk_clone(struct sock *newsk,
4993 * security_inet_conn_established() - Update sock's LSM state with connection
4994 * @sk: sock
4997 * Update @sock's LSM state to represent a new connection from @skb.
4999 void security_inet_conn_established(struct sock *sk,
5109 * @sk: associated sock
5113 * with the TUN device's sock structure.
5117 int security_tun_dev_attach(struct sock *sk, void *security)
5161 * Validiate permissions required for each address associated with sock @sk.
5168 int security_sctp_bind_connect(struct sock *sk, int optname,
5176 * security_sctp_sk_clone() - Clone a SCTP sock's LSM state
5178 * @sk: original sock
5179 * @newsk: target sock
5185 void security_sctp_sk_clone(struct sctp_association *asoc, struct sock *sk,
5186 struct sock *newsk)
5221 int security_mptcp_add_subflow(struct sock *sk, struct sock *ssk)