code wiki / _hdl_build / nx_cms_multisite_gate.nx
nx_cms_multisite_gate.nx
buildroot/runtime/_hdl_build/nx_cms_multisite_gate.nx
about
nx_cms_multisite_gate.nx -- CMS C7 GATE (re-runnable, evidence-driven): MULTI-SITE ISOLATION.
The deployment model is one admin daemon PER SITE (single responsibility, rule 9: a daemon does
one site's editing; the sites-daemon front door routes by host). This gate boots TWO real admin
daemons on two site dirs with different credentials and PROVES the isolation properties at the
wire: distinct seeds serve, site A's session is worthless at site B, A's password fails on B,
editing A never perturbs B's published bytes, and a cross-site save with A's session+csrf is
refused by B. Appends "CMSGATE row=nx_cms_multisite ... verdict=PASS|FAIL". Exit 0 iff all pass.
license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_cms_store.nxnx_connect.nxnx_sha256.nxnx_syscalls.nxnx_kill_portable.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
| 15 | const MS_PORT_A: i64 = 8083 |
| 16 | const MS_PORT_B: i64 = 8084 |
functions
| 21 | func ms_admin_path() -> *u8 |
| 27 | func ms_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 28 | func ms_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 29 | func ms_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 35 | func ms_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 |
| 41 | func ms_index(hay: *u8, n: i64, needle: *u8) -> i64 |
| 53 | func ms_has(hay: *u8, n: i64, needle: *u8) -> i64 { if ms_index(hay, n, needle) >= 0 { return 1 } return 0 } |
| 56 | func ms_http(port: i64, req: *u8, rl: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_socketsys_mmapnx_connect_boundedsys_closesys_writesys_set_socket_timeout+1 |
| 90 | func ms_post(req: *u8, path: *u8, cookie: *u8, body: *u8) -> i64 |
| 112 | func ms_get(req: *u8, path: *u8, cookie: *u8) -> i64 |
| 125 | func ms_row(id: i64, ok: i64, what: *u8) -> i64 |
| 135 | func ms_mkdir(path: *u8, mode: i64) -> i64 |
| 142 | func ms_pwfile(path: *u8, pw: *u8, pwlen: i64) -> i64 |
| 161 | func ms_boot(portstr: *u8, site: *u8, logpath: *u8) -> i64 |
| 180 | func main() -> i64 |