]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: give better message when invoked as non-root without arguments
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Sep 2020 10:20:14 +0000 (12:20 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Sep 2020 14:36:51 +0000 (16:36 +0200)
commit38ee19c04b1a7a9f8858d791c68c8a9b711a4e3d
tree9a304cfdd61b9f5502bb336682a240abb97961c4
parentfe79f107efc497b4e7a6b40e5b8a04a490b88d78
nspawn: give better message when invoked as non-root without arguments

When invoked as non-root, we would suggest re-running as root without any
further hint. But this immediately spawns a machine from the local directory,
which can be rather surprising. So let's give a better hint.

(In general, I don't think commandline programs should do "significant" things
when invoked without any arguments. In this regard it would be better if
systemd-nspawn would not spawn a machine from the current directory if called
with no arguments and at least "-D ." would be required.)
src/nspawn/nspawn.c