def main
import bend-osdev-caps@0.1.0.0/check.bend as Checkimport Base
import bend-osdev-caps@0.1.0.0/caps.bend as C
import bend-osdev-caps@0.1.0.0/exec.bend as E
import bend-osdev-caps@0.1.0.0/adjust.bend as A
60def main() -> IO(Unit):
61 do IO<Unit>:
62 IO.print(show_name(C.Cap.name(0)) ++ " " ++ show_name(C.Cap.name(21)) ++ " " ++ show_name(C.Cap.name(40)) ++ " " ++ show_name(C.Cap.name(41)))
63 IO.print(C.CapSet.show(C.CapSet.full()))
64 IO.print(C.CapSet.show(C.CapSet.from_list([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 31, 32, 40])))
65 IO.print(List.show(~&2, ~U32, ~U32.show, C.CapSet.to_list(C.CapSet.from_w64(C.CapSet.to_w64(C.CapSet.from_list([40, 13, 2]))))))
66 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(nothing()), ping(), False{})))
67 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(C.CapState.with_bounding(nothing(), C.CapSet.del(C.CapSet.full(), 13))), ping(), False{})))
68 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(nothing()), C.CapFile{0, True{}, False{}, None{}}, False{})))
69 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(nothing()), C.CapFile{0, True{}, False{}, None{}}, True{})))
70 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), C.CapCred{0, 0, 0, False{}, False{}, nothing()}, C.CapFile{1000, False{}, False{}, None{}}, False{})))
71 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), C.CapCred{0, 0, 0, True{}, False{}, nothing()}, C.CapFile{1000, False{}, False{}, None{}}, False{})))
72 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(ambient_bind()), C.CapFile{1000, False{}, False{}, None{}}, False{})))
73 IO.print(show(E.Caps.execve(C.CapsKernel.linux(), user(ambient_bind()), C.CapFile{1000, False{}, True{}, None{}}, False{})))
74 IO.print(show(E.Caps.execve(C.CapsKernel{40, False{}}, user(nothing()), ping(), False{})))
75 IO.print(show(A.Caps.capset(user(ambient_bind()), C.CapSet.empty(), C.CapSet.of(10), C.CapSet.empty())))
76 IO.print(show(A.Caps.capset(user(ambient_bind()), C.CapSet.of(10), C.CapSet.from_list([10, 12]), C.CapSet.of(10))))
77 IO.print(show(A.Caps.capset(user(ambient_bind()), C.CapSet.of(12), C.CapSet.of(10), C.CapSet.of(10))))
78 IO.print(show(A.Caps.capset(user(ambient_bind()), C.CapSet.empty(), C.CapSet.of(10), C.CapSet.from_list([10, 12]))))
79 IO.print(show(A.Caps.bset_drop(C.CapsKernel.linux(), user(ambient_bind()), 13)))
80 IO.print(show(A.Caps.bset_drop(C.CapsKernel.linux(), user(C.CapState{C.CapSet.of(8), C.CapSet.empty(), C.CapSet.of(8), C.CapSet.full(), C.CapSet.empty()}), 13)))
81 IO.print(show(A.Caps.bset_drop(C.CapsKernel{38, True{}}, user(C.CapState{C.CapSet.of(8), C.CapSet.empty(), C.CapSet.of(8), C.CapSet.full(), C.CapSet.empty()}), 39)))
82 IO.print(show(A.Caps.ambient_raise(C.CapsKernel.linux(), user(C.CapState{C.CapSet.of(12), C.CapSet.of(12), C.CapSet.empty(), C.CapSet.full(), C.CapSet.empty()}), 12)))
83 IO.print(show(A.Caps.ambient_raise(C.CapsKernel.linux(), C.CapCred{1000, 1000, 1000, False{}, True{}, C.CapState{C.CapSet.of(12), C.CapSet.of(12), C.CapSet.empty(), C.CapSet.full(), C.CapSet.empty()}}, 12)))
84 IO.print(show(A.Caps.ambient_lower(C.CapsKernel.linux(), user(ambient_bind()), 10)))
Uses (38)
Used by (0)
No other definition uses this definition.