summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authordelusionalai <delusionalai@users.noreply.git.jnsn.dev>2026-11-16 22:17:39 +0000
committerdelusionalai <delusionalai@users.noreply.git.jnsn.dev>2026-11-16 22:17:39 +0000
commitf3070d9751736de12f72038f6d4a558c68cf63f0 (patch)
tree84d8eb7bb2a575221f23eae219653182fc49b1f2 /.gitignore
parentf2fd518c16eec93bebc846db9341ee5831a41bed (diff)
downloaddevbox-ai/podman-minimal.tar.gz
devbox-ai/podman-minimal.zip
login.sh: drop to dev with exec instead of running su and falling through to a root shellai/podman-minimal
`su dev` starts a shell as dev, and when that shell exits the script carries on to `exec /bin/bash` - as root. So logging out of the devbox did not stop the container, it dropped you into a second, privileged shell: old: su dev; exec id -un -> root new: exec runuser -u dev -> dev runuser rather than su because this is exactly its job: root to a named user, no password prompt, no login shell. `su - dev` would also have cd'd to /home/dev and thrown away WORKDIR=/workspace. The environment was not the problem, su sets USER, LOGNAME, HOME and PATH on its own. exec is the other half: the shell replaces the entrypoint instead of being its child, so the container's lifetime is the shell's lifetime and signals reach it directly instead of queueing behind a root script that is waiting on su. Verified the drop happens on both storage paths (native filesystem and loop-mounted ext4) with the stub harness. --- Co-Authored-By: pi <pi@pi.dev>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions