]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: rename --user= to --uid= and repurpose --user/--system for runtime scope
authorDaan De Meyer <daan@amutable.com>
Sun, 29 Mar 2026 11:10:42 +0000 (11:10 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 Apr 2026 16:49:40 +0000 (18:49 +0200)
commite7fb7296f56dacc24054cddb2e1f0aa55ee7dc94
tree58e78fb5c3549b4829c2f8aa36a6d81c3a35fc14
parent1e084aad7d5c2132ed32ff2a75bbe21205c0f5f3
nspawn: rename --user= to --uid= and repurpose --user/--system for runtime scope

Rename nspawn's --user=NAME option to --uid=NAME for selecting the
container user. The -u short option is preserved. --user=NAME and
--user NAME are still accepted but emit a deprecation warning. A
pre-parsing step stitches the space-separated --user NAME form into
--user=NAME before getopt sees it, preserving backwards compatibility
despite --user now being an optional_argument.

Repurpose --user (without argument) and --system as standalone
switches for selecting the runtime scope (user vs system service
manager).

Replace all uses of the arg_privileged boolean with
arg_runtime_scope comparisons throughout nspawn. The default scope
is auto-detected from the effective UID.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
NEWS
man/systemd-nspawn.xml
shell-completion/bash/systemd-nspawn
shell-completion/zsh/_systemd-nspawn
src/nspawn/nspawn.c
src/vmspawn/vmspawn.c
test/units/TEST-13-NSPAWN.nspawn.sh