Announcing dbus 1.13.10
smcv at collabora.com
Tue May 14 11:16:04 UTC 2019
On Tue, 14 May 2019 at 11:24:25 +1200, Lawrence D'Oliveiro wrote:
> What are the thoughts on third parties putting stuff in /usr/share? I
> thought that was meant for distro packages, or at least software that
> plays nicely with the distro packaging system.
Yes, it is.
> Can policies also be
> found somewhere else? /usr/local/share? Somewhere in /opt as well?
Whatever locations the sysadmin wants to configure to be searched for
policies can be configured in /etc/dbus-1/system.d, or the sysadmin can
symlink their files into /etc/dbus-1/system.d.
It would be inappropriate for dbus-daemon to read locations under /opt
by default, because there is no defined structure for /opt, and it isn't
dbus' place to define a structure for it. Any sysadmin installing software
into /opt that needs to integrate with the rest of their OS should expect
to have to set up that integration.
It would probably be appropriate for dbus-daemon to read policies from
/usr/local/share by default, but that's harder to get right than you
might think, because there are some annoying issues involving precedence.
We normally want sysadmin configuration to "win", then third-party
software, then distro-packaged software, and finally dbus' own defaults;
but I think some directives in the dbus-daemon XML policy/configuration
language are "first wins" and some are "last wins". Combine this with the
fact that the only way to load policy fragments is an "include" instruction
(which behaves as though the included content replaced it, so fragments
included by a file in a sysadmin-controlled location would normally have the
same precedence as the sysadmin-controlled location itself) and it becomes
unexpectedly difficult to make the right things happen.
With hindsight, the dbus-daemon XML configuration language has many flaws,
particularly as a language for policy fragments.
If this is something you feel strongly about, I'd be happy to review a
researched and tested solution to #253. ("Researched" as in checking the
dbus-daemon source code to work out what the precedence order is for each
directive - first-wins or last-wins or arbitrary order.)
More information about the dbus