code wiki / _hdl_build / nx_cms_multisite_gate.nx

nx_cms_multisite_gate.nx

buildroot/runtime/_hdl_build/nx_cms_multisite_gate.nx

15649 B373 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic cms
docsdependenciesstructsconstsfunctions

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

nx_cms_store.nx nx_connect.nx nx_sha256.nx nx_syscalls.nx nx_kill_portable.nx nx_cms_multisite_gate.nx

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

main ms_mkdir sys_mmap cst_copy sys_openat_rd sys_openat_wr sys_close sys_mmap ↻ sys_read sys_write sys_renameat sys_openat_wr ↻ sys_write ↻ ms_len sys_close ↻ ms_pwfile sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ sys_openat_wr ↻ sys_write ↻ sys_close ↻ sys_fork sys_dup3 sys_mmap ↻ sys_execve sys_exit

structs

none

consts

15const MS_PORT_A: i64 = 8083
16const MS_PORT_B: i64 = 8084

functions

21func ms_admin_path() -> *u8
called by 1: ms_boot calls 2: sys_openat_rdsys_close
27func 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 }
called by 2: ms_rowmain calls 1: sys_write
28func ms_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: ms_indexms_postmain
29func ms_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 3: ms_postms_getmain
35func ms_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64
called by 3: ms_postms_getmain
41func ms_index(hay: *u8, n: i64, needle: *u8) -> i64
called by 2: ms_hasmain calls 1: ms_len
53func ms_has(hay: *u8, n: i64, needle: *u8) -> i64 { if ms_index(hay, n, needle) >= 0 { return 1 } return 0 }
called by 1: main calls 1: ms_index
56func ms_http(port: i64, req: *u8, rl: i64, resp: *u8, cap: i64) -> i64
90func ms_post(req: *u8, path: *u8, cookie: *u8, body: *u8) -> i64
called by 1: main calls 4: ms_catms_catnms_lensys_mmap
112func ms_get(req: *u8, path: *u8, cookie: *u8) -> i64
called by 1: main calls 2: ms_catms_catn
125func ms_row(id: i64, ok: i64, what: *u8) -> i64
called by 1: main calls 2: ms_wsys_mmap
135func ms_mkdir(path: *u8, mode: i64) -> i64
called by 1: main calls 1: sys_mmap
142func ms_pwfile(path: *u8, pw: *u8, pwlen: i64) -> i64
161func ms_boot(portstr: *u8, site: *u8, logpath: *u8) -> i64
180func main() -> i64