]> git.ipfire.org Git - thirdparty/systemd.git/commit
udevadm: drop pointless must_be_root() checks
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 18 Jan 2019 15:35:55 +0000 (16:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 May 2019 09:51:51 +0000 (11:51 +0200)
commit569ad251adde02dc0915758fe027e0346e50738a
tree22b6a037e8a341f658886a0fa746d93d325bbea3
parent717e8eda77b93ac396dc7ed325d5bcc61dfe2fa8
udevadm: drop pointless must_be_root() checks

Checking if we are root on the client side is generally pointless, since the
privileged operation will fail anyway and we can than log what precisly went
wrong.

A check like this makes sense only if:
- we need to do some expensive unprivileged operation before attempting the
  privileged operation, and the check allows us avoid wasting resources.
- the privileged operation would fail but in an unclear way.

Neither of those cases applies here.

This fixes calls like 'udevadm control -h' as unprivileged user.
src/udev/udevadm-control.c
src/udev/udevadm-trigger.c