code wiki / _hdl_build / nx_account_cleanup.nx
nx_account_cleanup.nx
buildroot/runtime/_hdl_build/nx_account_cleanup.nx
about
nx_account_cleanup.nx -- one-shot sovereign cleanup of the nishifamily OPAQUE account store.
Keeps ONLY elderwesto: its main credential AND its "|rec" recovery credential, both computed from
the REAL derivation (nx_ncs_derive_user_id_hash, same path register/login use) -- never from a guess.
Every OTHER identity in the store is SOFT-disabled (append is_current=0; additive-only per global
rule 13 -- history sacred, fully reversible by re-appending is_current=1).
SAFETY:
* FAIL-CLOSED: if elderwesto's main uid is NOT present in the store (realm/derivation mismatch),
ABORT and disable nobody (negative control against a wrong realm wiping the real account).
* DRY-RUN: with AC_DRYRUN=1 it only PRINTS what it would do (read the output before flipping to 0).
* IDEMPOTENT (rule 10): an identity whose latest row is already is_current=0 is skipped.
Run AFTER backing up the store. Store path = the live NAS store via the homes drvfs mount.
COMPOSES: hub/nx_user_account_store (nx_uas_append + _uas_hex_dec), hub/nx_no_cookie_session (derive).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_user_account_store.nxnx_no_cookie_session.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
| 20 | const AC_DRYRUN: i64 = 0 |
| 21 | const AC_STORE: *u8 = "/mnt/nas_homes/elderwesto/nishihost/opaque_store.log" |
| 22 | const AC_REALM: *u8 = "nishi_site_admin" |
| 23 | const AC_REALM_N: i64 = 16 |
| 24 | const AC_MAXACC: i64 = 256 |
functions
| 26 | func ac_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return n } |
| 27 | func ac_put_hex(b: *u8, n: i64) -> i64 |
| 34 | func ac_put_i64(v: i64) -> i64 |
| 42 | func ac_eq32(a: *u8, b: *u8) -> i64 called by 1: main |
| 47 | func ac_cpy(dst: *u8, src: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { dst[i] = src[i]; i = i + 1 } return n } called by 1: main |
| 49 | func main(argc: i64, argv: *i64) -> i64 |