Exec.CapExec.flags.go: def of bend-osdev-caps@0.1.0.0 Import: import bend-osdev-caps@0.1.0.0/exec.bend as Exec Lines 105-124 of bend-osdev-caps@0.1.0.0/exec.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-caps@0.1.0.0/exec.bend&start_line=105&end_line=124 import Base import bend-osdev-caps@0.1.0.0/caps.bend as C # "Capabilities and execution of programs by root": with r0 (real UID 0) # and e0 (effective UID 0, after the set-user-ID bit), unless SECBIT_NOROOT: # (1) the file's inheritable and permitted sets are all ones (but a # set-user-ID-root program with capabilities run by a non-root real # UID keeps its own); # (2) if e0, the file effective bit is one. def CapExec.flags.go(noroot: Bool, r0: Bool, e0: Bool, priv: Bool, fc: Maybe<&2, C.CapFileSets>) -> CapExecFlags: match noroot: case True{}: CapExec.flags.file(priv, False{}, fc) case False{}: match r0: case True{}: CapExecFlags{priv, Bool.or(e0, CapExec.fc_effective(fc)), C.CapSet.full(), C.CapSet.full()} case False{}: match e0: case True{}: CapExec.flags.suid_root(priv, fc) case False{}: CapExec.flags.file(priv, False{}, fc) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapFileSets https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapSet.full https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/exec.bend&name=CapExec.fc_effective https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/exec.bend&name=CapExec.flags.file https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/exec.bend&name=CapExec.flags.suid_root https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/exec.bend&name=CapExecFlags