Deleted Added
full compact
34c34
< * $FreeBSD: head/sys/security/mac_mls/mac_mls.c 122824 2003-11-17 01:04:07Z rwatson $
---
> * $FreeBSD: head/sys/security/mac_mls/mac_mls.c 122875 2003-11-18 00:39:07Z rwatson $
71a72
> #include <netinet/in_pcb.h>
952a954,965
> mac_mls_create_inpcb_from_socket(struct socket *so, struct label *solabel,
> struct inpcb *inp, struct label *inplabel)
> {
> struct mac_mls *source, *dest;
>
> source = SLOT(solabel);
> dest = SLOT(inplabel);
>
> mac_mls_copy_single(source, dest);
> }
>
> static void
1231a1245,1256
> static void
> mac_mls_inpcb_sosetlabel(struct socket *so, struct label *solabel,
> struct inpcb *inp, struct label *inplabel)
> {
> struct mac_mls *source, *dest;
>
> source = SLOT(solabel);
> dest = SLOT(inplabel);
>
> mac_mls_copy(source, dest);
> }
>
1423a1449,1463
> mac_mls_check_inpcb_deliver(struct inpcb *inp, struct label *inplabel,
> struct mbuf *m, struct label *mlabel)
> {
> struct mac_mls *p, *i;
>
> if (!mac_mls_enabled)
> return (0);
>
> p = SLOT(mlabel);
> i = SLOT(inplabel);
>
> return (mac_mls_equal_single(p, i) ? 0 : EACCES);
> }
>
> static int
2380a2421
> .mpo_init_inpcb_label = mac_mls_init_label_waitcheck,
2392a2434
> .mpo_destroy_inpcb_label = mac_mls_destroy_label,
2439a2482
> .mpo_create_inpcb_from_socket = mac_mls_create_inpcb_from_socket,
2449a2493
> .mpo_inpcb_sosetlabel = mac_mls_inpcb_sosetlabel,
2458a2503
> .mpo_check_inpcb_deliver = mac_mls_check_inpcb_deliver,