def CapExec.flags.suid_root

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

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

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}

Uses (5)

Used by (1)