RuleFile.AaFp.result: def of bend-osdev-apparmor@0.1.0.0 Import: import bend-osdev-apparmor@0.1.0.0/rule_file.bend as RuleFile Lines 262-269 of bend-osdev-apparmor@0.1.0.0/rule_file.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&start_line=262&end_line=269 import Base import bend-osdev-apparmor@0.1.0.0/perm.bend as P import bend-osdev-apparmor@0.1.0.0/error.bend as E # valid: whole letters, not w with a, an exec mode only without deny, a bare # x only with deny, something granted def AaFp.result(f: AaFp, +deny: Bool, src: E.AaSrc) -> Result<&2, &2, E.AaError, AaFPerms>: match f: case AaFp{st, +r, +w, +a, +l, +k, +m, +e, +b, ok}: +ex = AaFp.is_some(e) +good = Bool.and(ok, Bool.and(AaFp.base_st(st), Bool.and(Bool.not(Bool.and(w, a)), Bool.and(Bool.not(Bool.and(deny, ex)), Bool.and(Bool.not(Bool.and(Bool.not(deny), b)), Bool.and(Bool.not(Bool.and(ex, b)), Bool.or(r, Bool.or(w, Bool.or(a, Bool.or(l, Bool.or(k, Bool.or(m, Bool.or(ex, b))))))))))))) Bool.pick(Result<&2, &2, E.AaError, AaFPerms>, good, Done{AaFPerms{P.AaPerms.of_bits([r, w, Bool.or(w, a), l, k, m, Bool.or(ex, b)]), e}}, Fail{E.AaSrc.perms(src)}) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/error.bend&name=AaError https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/error.bend&name=AaSrc https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/error.bend&name=AaSrc.perms https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/perm.bend&name=AaPerms.of_bits https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&name=AaFPerms https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&name=AaFp https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&name=AaFp.base_st https://jend.leeeet.dev/definition.txt?path=bend-osdev-apparmor@0.1.0.0/rule_file.bend&name=AaFp.is_some