code wiki / _hdl_build / nx_media_access_gate.nx

nx_media_access_gate.nx

buildroot/runtime/_hdl_build/nx_media_access_gate.nx

6034 B98 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic media
docsdependenciesstructsconstsfunctions

about

nx_media_access_gate.nx -- proves the operator's media model (2026-06-17): "everything accessible EVERYWHERE but with different LEVELS of access." Reachable from anywhere (an internet deploy behind the OPAQUE wall), but always login-gated + level-gated. Two folders: /library/ -> SFW (Zatoichi, Mr Bean ...) -> FAMILY level (1): you + family can watch, from anywhere /recordings/ -> NSFW (our own recordings) -> OWNER level (3): ONLY you (elder), from anywhere, nobody else catch-all "/" -> 1, so EVERYTHING needs at least a family login (reachable everywhere, but never public/open); recordings need the OWNER level (only elder's account holds it). Owner sees all; family sees SFW only and the recordings are NOT EVEN LISTED for them. Composes nx_authz (proven). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_authz.nx nx_syscalls.nx nx_media_access_gate.nx

imports: nx_authz.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mw sys_write sys_mmap mslen authz_filter authz_level_allow acl_is_prefix mrow mw ↻ sys_mmap ↻ sys_write ↻ mcontains mallow authz_level_allow ↻ mslen ↻ sys_write ↻ sys_openat_append sys_close sys_exit

structs

none

consts

12const LVL_PUBLIC: i64 = 0
13const LVL_FAMILY: i64 = 1
14const LVL_OWNER: i64 = 3

functions

16func mw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: mrowmain calls 1: sys_write
17func mslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: mallowmain
18func mrow(id: i64, ok: i64, what: *u8) -> i64 { mw("MAROW " as *u8); let b: *u8=sys_mmap(8); b[0]=(48+id) as u8; sys_write(1,b,1); mw(" " as *u8); if ok==1 { mw("PASS " as *u8) } else { mw("FAIL " as *u8) } mw(what); mw("\n" as *u8); return ok }
called by 1: main calls 3: mwsys_mmapsys_write
19func mcontains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main
26func mallow(level: i64, pp: *i64, pl: *i64, pv: *i64, np: i64, req: *u8) -> i64
called by 1: main calls 2: authz_level_allowmslen
30func main() -> i64