consider warning when session services have the wrong name
Submitted by Simon McVittie
Assigned to D-Bus Maintainers
Best practice for D-Bus session services is to define the service com.example.Foo in a file named com.example.Foo.service. This ensures that it is unambiguous which one is started: the one that is first in directory search order (this is not 100% reliable until one of the patches from Bug #99825 lands).
dbus-daemon could warn if a service is encountered that does not satisfy that constraint. However, this is currently wrong in a lot of software https://lintian.debian.org/tags/dbus-session-service-wrong-name.html so we should probably get some of those fixed first.
The cost of obeying that constraint is that if two software packages are deliberately providing implementations of the same well-known bus name, they will have file conflicts. However, this does not seem a whole lot worse than the current situation, where whichever one appears first in readdir() order is chosen, which I'm fairly sure is not what the software author intended.
Version: git master