Lines Matching full:socket
61 #include <sys/socket.h>
78 * Currently, sockets hold two labels: the label of the socket itself, and a
85 * remote socket for UNIX domain sockets rather than keeping a local copy on
90 * sockets (the socket lock) is not frequently held at the points in code
91 * where socket-related checks are called. The MAC Framework acquires the
145 mac_socket_init(struct socket *so, int flag)
182 mac_socket_destroy(struct socket *so)
208 MAC_POLICY_EXTERNALIZE(socket, label, elements, outbuf, outbuflen);
230 MAC_POLICY_INTERNALIZE(socket, label, string);
236 mac_socket_create(struct ucred *cred, struct socket *so)
243 mac_socket_newconn(struct socket *oldso, struct socket *newso)
251 mac_socket_relabel(struct ucred *cred, struct socket *so,
262 mac_socketpeer_set_from_mbuf(struct mbuf *m, struct socket *so)
276 mac_socketpeer_set_from_socket(struct socket *oldso, struct socket *newso)
287 mac_socket_create_mbuf(struct socket *so, struct mbuf *m)
301 "struct socket *");
304 mac_socket_check_accept(struct ucred *cred, struct socket *so)
316 "struct socket *", "struct sockaddr *");
319 mac_socket_check_bind(struct ucred *cred, struct socket *so,
332 "struct socket *", "struct sockaddr *");
335 mac_socket_check_connect(struct ucred *cred, struct socket *so,
363 MAC_CHECK_PROBE_DEFINE2(socket_check_deliver, "struct socket *",
367 mac_socket_check_deliver(struct socket *so, struct mbuf *m)
385 "struct socket *");
388 mac_socket_check_listen(struct ucred *cred, struct socket *so)
400 "struct socket *");
403 mac_socket_check_poll(struct ucred *cred, struct socket *so)
414 "struct socket *");
417 mac_socket_check_receive(struct ucred *cred, struct socket *so)
429 "struct socket *", "struct label *");
432 mac_socket_check_relabel(struct ucred *cred, struct socket *so,
447 "struct socket *");
450 mac_socket_check_send(struct ucred *cred, struct socket *so)
461 "struct socket *");
464 mac_socket_check_stat(struct ucred *cred, struct socket *so)
475 "struct socket *");
478 mac_socket_check_visible(struct ucred *cred, struct socket *so)
490 mac_socket_label_set(struct ucred *cred, struct socket *so,
496 * We acquire the socket lock when we perform the test and set, but
498 * which will precede the socket lock in the lock order. However,
501 * acquire the socket lock before refreshing, holding both locks.
514 * If the protocol has expressed interest in socket layer changes,
516 * from the socket, notify it of the label change while holding the
517 * socket lock.
526 mac_setsockopt_label(struct ucred *cred, struct socket *so,
560 mac_getsockopt_label(struct ucred *cred, struct socket *so,
599 mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so,