systemctl: drop one must_be_root_check()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 May 2019 09:29:53 +0000 (11:29 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 May 2019 09:51:51 +0000 (11:51 +0200)
commita004cb75c0a0ae085ebc9b470afba68375a53507
tree55969e58deb508161bf762264a0c60904e3328e5
parent7c3ce8b5a96ef7d377fe3a3b38b547b17f0c7e88
systemctl: drop one must_be_root_check()

(before)
$ build/systemctl list-machines
Need to be root.
$ sudo build/systemctl list-machines
NAME          STATE   FAILED JOBS
krowka (host) running      0    0
rawhide       running      0    0

2 machines listed.

(after)
$ build/systemctl list-machines
NAME          STATE   FAILED JOBS
krowka (host) running      0    0
rawhide       n/a          0    0

2 machines listed.

The output for non-root is missing some bits of information, but we display
what information is missing nicely, and e.g. in the case when no machines are
running at all, or only VMs are running, the unprivileged output would be the
same as the privileged one.
src/systemctl/systemctl.c