| 1985 | } |
| 1986 | |
| 1987 | static int |
| 1988 | lomac_socket_check_visible(struct ucred *cred, struct socket *so, |
| 1989 | struct label *solabel) |
| 1990 | { |
| 1991 | struct mac_lomac *subj, *obj; |
| 1992 | |
| 1993 | if (!lomac_enabled) |
| 1994 | return (0); |
| 1995 | |
| 1996 | subj = SLOT(cred->cr_label); |
| 1997 | obj = SLOT(solabel); |
| 1998 | |
| 1999 | SOCK_LOCK(so); |
| 2000 | if (!lomac_dominate_single(obj, subj)) { |
| 2001 | SOCK_UNLOCK(so); |
| 2002 | return (ENOENT); |
| 2003 | } |
| 2004 | SOCK_UNLOCK(so); |
| 2005 | |
| 2006 | return (0); |
| 2007 | } |
| 2008 | |
| 2009 | static void |
| 2010 | lomac_socket_create(struct ucred *cred, struct socket *so, |
nothing calls this directly
no test coverage detected