def Caps.capset
import bend-osdev-caps@0.1.0.0/adjust.bend as Adjustimport Base
import bend-osdev-caps@0.1.0.0/caps.bend as C
59# capset(2) with new effective e, permitted p and inheritable i. The rules
60# are checked in this order, and the first that fails names the error.
61def Caps.capset(+c: C.CapCred, e: C.CapSet(), +p: C.CapSet(), i: C.CapSet()) -> Result<&2, &2, C.CapsError, C.CapCred>:
62 CapAdjust.capset.r1(C.CapSet.subset(p, C.CapState.permitted(C.CapCred.sets(c))), c, e, p, i)