Red Hat Bugzilla – Bug 982920
systemd --test paranoid security
Last modified: 2014-10-14 21:27:38 EDT
Description of problem:
systemd --test can not be run as root nor as an ordinary user
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. as root:
systemd --test --system --unit=multi-user.target
Don't run test mode as root.
2. as a normal user:
$ systemd --test --system --unit=multi-user.target
systemd 204 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
Failed to set hostname to <fc20.homelinux.org>: Operation not permitted
Failed to open /dev/tty0: Permission denied
Failed to create root cgroup hierarchy: Permission denied
Failed to allocate manager object: Permission denied
Bug proves --test functionality is not understood by the programmers.
--test implies do nothing harmful and should be run by root.
Bug proves --test functionality has not been tested at all.
This example is strait from the fedora 19 docs.
This got fixed as part of the systemd-analyze work (http://cgit.freedesktop.org/systemd/systemd/commit/?id=0d8c31ff72 is the gist of that). So this works fine in F21 since a while. I'll not backport this though.