def AaMountOpts.allows

bend-osdev-apparmor@0.1.0.0 · rule_mount.bend:240

import bend-osdev-apparmor@0.1.0.0/rule_mount.bend as RuleMount
import Base
import bend-osdev-apparmor@0.1.0.0/text.bend as X

240# every option of q is one of the flags; and, for an exact condition, the other way round too
241def AaMountOpts.allows(o: AaMountOpts, +q: List<&2, List<&2, U32>>) -> Bool:
242  match o:
243    case AaMountOpts{exact, +fl}:
244      match exact:
245        case True{}:
246          Bool.and(X.AaText.subset(q, fl), X.AaText.subset(fl, q))
247        case False{}:
248          X.AaText.subset(q, fl)

Uses (6)

Used by (1)