systemctl: refuse --capsule=foo with --system
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 4 Aug 2024 05:07:13 +0000 (14:07 +0900)
committerLuca Boccassi <bluca@debian.org>
Thu, 15 Aug 2024 13:04:41 +0000 (14:04 +0100)
commit90b1b2a500ccd093687cf683f543fc8a3b00b525
tree3b4c58059ee55c30b36b2b98c8aebf822b1e5707
parent38caeac7680b3f7a81b741336f57f9b56d040297
systemctl: refuse --capsule=foo with --system

Fixes the following assertion:
===
systemctl --capsule=hoge --system reboot
Assertion 'runtime_scope == RUNTIME_SCOPE_USER' failed at src/shared/bus-util.c:479, function bus_connect_transport(). Aborting.
Aborted (core dumped)
===

Follow-up for 56cb74c3cd1358d7d0b3f613feaf2eeab601a6bd.

(cherry picked from commit bcf982223cc5d051818dc88866a42f6a08f39a4a)
src/systemctl/systemctl.c