nx_torrent_area_gate.nx
buildroot/runtime/nx_torrent_area_gate.nx
about
nx_torrent_area_gate.nx -- referee for the torrent daemon's R2 two-area routing + isolation.
Imports nx_torrent_daemon (import strips main) so it tests the REAL daemon fns: d_parse_area (the
"area=media|gallery" flag), nx_taccess_allow (deny-by-default), and d_resolve_dir (the access-gated
dir lookup that /stream + the control verbs use). The load-bearing rows: a FAMILY viewer can flag/see
only SFW, and CANNOT even RESOLVE an NSFW torrent's dir by id (so they can't stream/control it) =
isolation by construction. Prints verdict=GREEN to STDOUT *and* returns the exit code (0=pass).
Durable verdict -> knowledge/status/torrent_area_gate.log. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_torrent_daemon.nxnx_torrent_access.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
| none |
functions
| 11 | func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 12 | func g_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 13 | func g_w(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } called by 1: main |
| 14 | func g_wn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } called by 1: main |
| 17 | func g_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 27 | func g_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 30 | func chk(got: i64, want: i64, label: *u8) -> i64 |
| 36 | func main() -> i64 |