def CapExec.flags.suid_root
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
89# effective UID 0 but real UID not: the file's sets are all ones, unless the
90# file has capabilities (a set-user-ID-root program with file capabilities)
91def CapExec.flags.suid_root(priv: Bool, fc: Maybe<&2, C.CapFileSets>) -> CapExecFlags:
92 match fc:
93 case None{}:
94 CapExecFlags{priv, True{}, C.CapSet.full(), C.CapSet.full()}
95 case Some{C.CapFileSets{fp, fi, fe}}:
96 CapExecFlags{priv, True{}, fp, fi}