Changeset View
Changeset View
Standalone View
Standalone View
sys/security/mac/mac_socket.c
Show First 20 Lines • Show All 510 Lines • ▼ Show 20 Lines | mac_socket_label_set(struct ucred *cred, struct socket *so, | ||||
SOCK_UNLOCK(so); | SOCK_UNLOCK(so); | ||||
/* | /* | ||||
* If the protocol has expressed interest in socket layer changes, | * If the protocol has expressed interest in socket layer changes, | ||||
* such as if it needs to propagate changes to a cached pcb label | * such as if it needs to propagate changes to a cached pcb label | ||||
* from the socket, notify it of the label change while holding the | * from the socket, notify it of the label change while holding the | ||||
* socket lock. | * socket lock. | ||||
*/ | */ | ||||
if (so->so_proto->pr_usrreqs->pru_sosetlabel != NULL) | if (so->so_proto->pr_sosetlabel != NULL) | ||||
(so->so_proto->pr_usrreqs->pru_sosetlabel)(so); | so->so_proto->pr_sosetlabel(so); | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
mac_setsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) | mac_setsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) | ||||
{ | { | ||||
struct label *intlabel; | struct label *intlabel; | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |