def CapAdjust.ambient_lower.go

bend-osdev-caps@0.1.0.0 · adjust.bend:123

import bend-osdev-caps@0.1.0.0/adjust.bend as Adjust
import Base
import bend-osdev-caps@0.1.0.0/caps.bend as C

123def CapAdjust.ambient_lower.go(v: Bool, +c: C.CapCred, x: U32) -> Result<&2, &2, C.CapsError, C.CapCred>:
124  match v:
125    case False{}:
126      Fail{C.CapsInvalidCap{}}
127    case True{}:
128      +s = C.CapCred.sets(c)
129      Done{C.CapCred.with_sets(c, C.CapState.with_ambient(s, C.CapSet.del(C.CapState.ambient(s), x)))}

Uses (10)

Used by (3)