code wiki / _hdl_build / nx_media_access_gate.nx
nx_media_access_gate.nx
buildroot/runtime/_hdl_build/nx_media_access_gate.nx
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
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
structs
| none |
consts
| 12 | const LVL_PUBLIC: i64 = 0 |
| 13 | const LVL_FAMILY: i64 = 1 |
| 14 | const LVL_OWNER: i64 = 3 |
functions
| 16 | func mw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func mslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func 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 } |
| 19 | func mcontains(hay: *u8, hn: i64, needle: *u8) -> i64 called by 1: main |
| 26 | func mallow(level: i64, pp: *i64, pl: *i64, pv: *i64, np: i64, req: *u8) -> i64 |
| 30 | func main() -> i64 |