MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lomac_socket_check_visible

Function lomac_socket_check_visible

freebsd/security/mac_lomac/mac_lomac.c:1987–2007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1985}
1986
1987static int
1988lomac_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
2009static void
2010lomac_socket_create(struct ucred *cred, struct socket *so,

Callers

nothing calls this directly

Calls 1

lomac_dominate_singleFunction · 0.85

Tested by

no test coverage detected