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

Function try_relabel

freebsd/security/mac_lomac/mac_lomac.c:587–595  ·  view source on GitHub ↗

* Relabel "to" to "from" only if "from" is a valid label (contains at least * a single), as for a relabel operation which may or may not involve a * relevant label. */

Source from the content-addressed store, hash-verified

585 * relevant label.
586 */
587static void
588try_relabel(struct mac_lomac *from, struct mac_lomac *to)
589{
590
591 if (from->ml_flags & MAC_LOMAC_FLAG_SINGLE) {
592 bzero(to, sizeof(*to));
593 lomac_copy(from, to);
594 }
595}
596
597/*
598 * Policy module operations.

Callers 5

lomac_cred_relabelFunction · 0.85
lomac_ifnet_relabelFunction · 0.85
lomac_pipe_relabelFunction · 0.85
lomac_socket_relabelFunction · 0.85
lomac_vnode_relabelFunction · 0.85

Calls 2

bzeroFunction · 0.85
lomac_copyFunction · 0.85

Tested by

no test coverage detected