def AaFrames.add_rules

bend-osdev-apparmor@0.1.0.0 · parse.bend:1587

import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse
import Base
import bend-osdev-apparmor@0.1.0.0/profile.bend as PR

1587# the rules added to the innermost profile
1588def AaFrames.add_rules(fs: List<&2, AaFrame>, rs: PR.AaRules) -> List<&2, AaFrame>:
1589  match fs:
1590    case Nil{}:
1591      Nil{}
1592    case Con{f, t}:
1593      match f:
1594        case AaFrame{p, h, full, q, s}:
1595          match p:
1596            case None{}:
1597              Con{AaFrame{None{}, h, full, q, s}, AaFrames.add_rules(t, rs)}
1598            case Some{x}:
1599              Con{AaFrame{Some{PR.AaProfile.prepend(x, rs)}, h, full, q, s}, t}

Uses (5)

Used by (1)