Bug 99876 - prefer recommended service naming on collision
Summary: prefer recommended service naming on collision
Status: RESOLVED MOVED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: git master
Hardware: Other All
: medium enhancement
Assignee: D-Bus Maintainers
QA Contact: D-Bus Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 99825
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-20 17:07 UTC by Simon McVittie
Modified: 2018-10-12 21:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
activation: Add support for enforcing strict naming on .service files (6.94 KB, patch)
2017-02-20 19:31 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2017-02-20 17:07:24 UTC
As noted in Bug #99873, many session services are named in a non-canonical way.

One thing we can do to make this better is: if a directory in the search path contains a canonically-named service and a non-canonically-named service for the same well-known bus name, we should prefer the canonically-named one, instead of just taking whichever comes first in readdir() order.
Comment 1 Philip Withnall 2017-02-20 17:44:14 UTC
To be clear, you mean to order by (search path, is canonically named?) rather than (is canonically named?, search path), right? The current behaviour is (search path, random).
Comment 2 Simon McVittie 2017-02-20 17:55:21 UTC
(In reply to Philip Withnall from comment #1)
> To be clear, you mean to order by (search path, is canonically named?)
> rather than (is canonically named?, search path), right? The current
> behaviour is (search path, random).

Yes. A non-canonically-named service in /usr/local should still beat a canonically-named service in /usr.
Comment 3 Simon McVittie 2017-02-20 19:31:36 UTC
Created attachment 129772 [details] [review]
activation: Add support for enforcing strict naming on  .service files

This is done on a per-directory basis.

The use of the BusContext here means we have to make the activation
test a little more realistic, by providing a non-NULL BusContext.

---

Move BusServiceDirFlags in BusServiceDirectory from previous commit to here.

Add bug references. Log a _dbus_verbose() for Bug #99873 for now.
Comment 4 Simon McVittie 2017-02-20 19:32:21 UTC
Comment on attachment 129772 [details] [review]
activation: Add support for enforcing strict naming on  .service files

Sigh, wrong bug.
Comment 5 GitLab Migration User 2018-10-12 21:30:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/169.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.