omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / qualification / security673 / pure-launch.om
| 1 | note Trusted launch adapter for strict-profile tests. Invoke only as a fresh supervised child. |
| 2 | note Failure may already have restricted this process; report the error and exit, never fall back. |
| 3 | global path uchar 1024 |
| 4 | global packet uchar 4096 |
| 5 | text error "PURE_LAUNCH_REFUSED\n" |
| 6 | fn main to int |
| 7 | if ne argcnt 2 |
| 8 | ret 90 |
| 9 | end |
| 10 | n = argread 1 path 0 len path |
| 11 | if or le n 0 gt n 1024 |
| 12 | ret 90 |
| 13 | end |
| 14 | put packet 0 1 |
| 15 | put packet 2 uchar and ulong n 255 |
| 16 | put packet 3 uchar shr ulong n 8 |
| 17 | for i ulong ulong n |
| 18 | put packet add i 4 get path i |
| 19 | end |
| 20 | r = execpure packet 0 add 4 ulong n |
| 21 | s = write 2 error 0 len error |
| 22 | if lt r 0 |
| 23 | ret int neg r |
| 24 | end |
| 25 | ret 99 |
| 26 | end |