feat(storage): scoped grants (subtree, ro/rw), narrow-only, release revokes all holders; IPC KEEP_DELEGATE opt-in; shell cd/pwd, programs get ro cwd

This commit is contained in:
2026-10-27 20:20:34 +01:00
parent c603a578c0
commit 1fc5a54f06
38 changed files with 1237 additions and 170 deletions

View File

@@ -1,7 +1,8 @@
The shell runs a program by asking init to load it (init alone may
create processes), then gives the program the terminal as its output
and the storage server, writes its arguments onto a page it moves
into the program, starts it and waits for it to die.
and a read-only storage grant to the current directory, writes its
arguments onto a page it moves into the program, starts it and waits
for it to die. Then it takes the grant back.
Built-ins: help, echo, clear. Anything else is a program on disk:
`name args...` runs name.elf.
Built-ins: help, echo, clear, cd, pwd. Anything else is a program on
disk: `name args...` runs name.elf.

View File

@@ -2,6 +2,6 @@ Welcome to k-os.
Every program here runs with only the capabilities it was given:
this file reached your screen because the shell handed `cat` the
terminal and the storage server, and nothing else.
terminal and read-only access to this directory, and nothing else.
Try: ls ls docs cat docs/shell.txt
Try: ls cd docs cat shell.txt cat ../readme.txt