def CapExec.dumb_ok
import bend-osdev-caps@0.1.0.0/exec.bend as Execimport Base
import bend-osdev-caps@0.1.0.0/caps.bend as C
147# "Safety checking for capability-dumb binaries": a file with capabilities
148# and the effective bit must grant all of its permitted set
149def CapExec.dumb_ok(fc: Maybe<&2, C.CapFileSets>, p: C.CapSet()) -> Bool:
150 match fc:
151 case None{}:
152 True{}
153 case Some{C.CapFileSets{fp, fi, fe}}:
154 match fe:
155 case False{}:
156 True{}
157 case True{}:
158 C.CapSet.subset(fp, p)