def AaParse.keyword

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

import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse
import Base
import bend-osdev-apparmor@0.1.0.0/token.bend as T

1071# the keyword of a rule: 1 capability, 2 network, 3 signal, 4 ptrace, 5
1072# mount, 6 remount, 7 umount, 8 dbus, 9 change_profile, 10 file, 11 a rule
1073# kind outside the model, 12 a statement that belongs in the preamble, 0 none
1074# (a file rule without the keyword)
1075def AaParse.keyword(+t: T.AaTerm) -> Nat:
1076  Bool.pick(Nat, T.AaTerm.is(t, "capability"), 1n, Bool.pick(Nat, T.AaTerm.is(t, "network"), 2n, Bool.pick(Nat, T.AaTerm.is(t, "signal"), 3n, Bool.pick(Nat, T.AaTerm.is(t, "ptrace"), 4n, Bool.pick(Nat, T.AaTerm.is(t, "mount"), 5n, Bool.pick(Nat, T.AaTerm.is(t, "remount"), 6n, Bool.pick(Nat, T.AaTerm.is(t, "umount"), 7n, Bool.pick(Nat, T.AaTerm.is(t, "dbus"), 8n, Bool.pick(Nat, T.AaTerm.is(t, "change_profile"), 9n, Bool.pick(Nat, T.AaTerm.is(t, "file"), 10n, Bool.pick(Nat, T.AaTerm.is_one_of(t, AaParse.unsupported()), 11n, Bool.pick(Nat, Bool.or(T.AaTerm.is(t, "alias"), T.AaTerm.is(t, "abi")), 12n, 0n))))))))))))

Uses (7)

Used by (1)