def AaTrans.cx

bend-osdev-apparmor@0.1.0.0 · transitions.bend:263

import bend-osdev-apparmor@0.1.0.0/transitions.bend as Transitions
import Base
import bend-osdev-apparmor@0.1.0.0/profile.bend as PR
import bend-osdev-apparmor@0.1.0.0/rule_file.bend as F
import bend-osdev-apparmor@0.1.0.0/eval.bend as V

263# cx: the child named, else the child whose attachment matches best
264def AaTrans.cx(tg: Maybe<&2, List<&2, U32>>, +p: PR.AaProfile, +pname: List<&2, U32>, +path: List<&2, U32>, scrub: Bool, fb: F.AaXFallback, d: V.AaDecision) -> AaExecResult:
265  match tg:
266    case Some{+t}:
267      AaTrans.named(PR.AaProfile.find(PR.AaProfile.children(p), t), AaAttach.join(pname, t), fb, scrub, d)
268    case None{}:
269      AaTrans.attached(AaAttach.best(PR.AaProfile.children(p), path, pname, AaAttachNone{}), fb, scrub, d)

Uses (15)

Used by (1)