bus driver: factor out bus_driver_check_caller_is_privileged, and allow root
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 26 Jan 2015 19:12:01 +0000 (19:12 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 3 Feb 2015 16:19:11 +0000 (16:19 +0000)
commit1f716452e702159dc98af00fa7a0c6775ec8de40
tree273490898fe78e1fd6ec61e6aded3b30d811cf7a
parent98ae1149adf23acd0aae9611f93ac2250ac37bd7
bus driver: factor out bus_driver_check_caller_is_privileged, and allow root

Unlike the initial mitigation for CVE-2014-8148, we now allow
uid 0 to call UpdateActivationEnvironment. There's no point in root
doing that, but there's also no reason why it's particularly bad -
if an attacker is uid 0 we've already lost - and it simplifies
use of this function for future things that do want to be callable
by root, like BecomeMonitor for #46787.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
bus/driver.c
test/uid-permissions.c