mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-05 19:09:43 +08:00
exec() and spawn() run programs as the account "user" by default, and kwtty falls back to root where /etc/passwd has no such account. On an image of your own that lacks it, programs ran as root without any sign of it. For a kernel that boots a distro image, the first program that names no user now asks kwtty for "user" by name (not critical, so a guest from before the USER option runs it as root as before). When kwtty answers "no user user", the SDK logs one warning through createKernel's log and opens the same session with the default, so the account used does not change. Later programs send the default as before. The base shell, which has root only, gets no check and no warning. Co-authored-by: Pooya Parsa <pooya@pi0.io>