Lines Matching refs:mac

526 mac_setsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac)  in mac_setsockopt_label()  argument
535 error = mac_check_structmac_consistent(mac); in mac_setsockopt_label()
539 buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK); in mac_setsockopt_label()
540 error = copyinstr(mac->m_string, buffer, mac->m_buflen, NULL); in mac_setsockopt_label()
559 mac_getsockopt_label(struct ucred *cred, struct socket *so, struct mac *mac) in mac_getsockopt_label() argument
568 error = mac_check_structmac_consistent(mac); in mac_getsockopt_label()
572 elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK); in mac_getsockopt_label()
573 error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL); in mac_getsockopt_label()
579 buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO); in mac_getsockopt_label()
585 mac->m_buflen); in mac_getsockopt_label()
588 error = copyout(buffer, mac->m_string, strlen(buffer)+1); in mac_getsockopt_label()
598 struct mac *mac) in mac_getsockopt_peerlabel() argument
607 error = mac_check_structmac_consistent(mac); in mac_getsockopt_peerlabel()
611 elements = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK); in mac_getsockopt_peerlabel()
612 error = copyinstr(mac->m_string, elements, mac->m_buflen, NULL); in mac_getsockopt_peerlabel()
618 buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO); in mac_getsockopt_peerlabel()
624 mac->m_buflen); in mac_getsockopt_peerlabel()
627 error = copyout(buffer, mac->m_string, strlen(buffer)+1); in mac_getsockopt_peerlabel()