def CapExec.dumb_ok

bend-osdev-caps@0.1.0.0 · exec.bend:147

import bend-osdev-caps@0.1.0.0/exec.bend as Exec
import 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)

Uses (5)

Used by (2)