bus/driver: Only allow specific methods to be called at wrong paths
authorSimon McVittie <smcv@collabora.com>
Wed, 31 May 2017 17:27:11 +0000 (18:27 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 2 Jun 2017 09:43:34 +0000 (10:43 +0100)
commite3083cc2009a1bd3a0079e9c617f582d417e9a9e
treedd49b776da5403dd31136fd761c5dfe15a43fd8c
parent093ec67b8f0e0117f614adf262042531e0be4edf
bus/driver: Only allow specific methods to be called at wrong paths

The default for the future should be that new functionality should
only be available at /org/freedesktop/DBus, which is the canonical
path of the "bus driver" object that represents the message bus.

The disallowed methods are still in Introspect() output, and
raise AccessDenied instead of UnknownMethod, to preserve the invariant
that the o.fd.DBus interface has constant contents.

test/dbus-daemon.c already asserts that UpdateActivationEnvironment()
still raises AccessDenied when invoked on a non-canonical path;
this has been in place since 1.8.14.

Reviewed-by: Philip Withnall <withnall@endlessm.com>
[smcv: Adjust comments, enum order, variable naming as per Philip's review]
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101256
bus/driver.c
bus/driver.h