Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible conflict of .service files with other Secret Service providers #33

Open
michaelk83 opened this issue Sep 7, 2022 · 2 comments

Comments

@michaelk83
Copy link

The provided .service files in the current form and instructions may conflict with similar files installed by other Secret Service providers, such as Gnome Keyring. This may be less important while the installation is manual, but in general, they should follow the compatibility guidelines in xdg-specs#75. More specifically:

  • Use provider-specific names such as dbus-org.freedesktop.secrets.pass-secret-service.service and org.freedesktop.secrets.pass-secret-service.service.
  • Use a symlink from org.freedesktop.secrets.service to the provider-specific file (instead of using a hard-coded org.freedesktop.secrets.service file).
  • Use an Alias=dbus-org.freedesktop.secrets.service directive in the provider-specific dbus-org... file.
  • The SystemdService= directive should refer to the provider-specific file name.

See the xdg-specs#75 and Alias= documentation for details.

@aidalgol may be able to assist with this issue.


In addition, I think you have your files backwards in the readme:

  • The dbus-org.... file with the [Unit] section is the SystemD unit file, and should go in .../lib/systemd/user/.
  • The org.... file with the [D-BUS Service] is not a SystemD file. It's a DBus activation file, and should go in .../share/dbus-1/services/. I would also move it to a dbus folder in the source tree, to avoid confusion.

Both of these can be placed under /usr/local/, or maybe even ~/.local/. See https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-starting-services

If two .service files in different directories offer the same service name, the one in the higher-priority directory is used: for instance, on the system bus, .service files in /usr/local/share/dbus-1/system-services take precedence over those in /usr/share/dbus-1/system-services.


Same for Gnome keyring: gnome-keyring#86
KeePassXC: keepassxc#6274 (comment)
KWallet: KDE bug 458339

@aidalgol
Copy link
Contributor

It's quite possible I got the unit files swapped. I was trying to puzzle out this part of systemd and D-Bus from patchy documentation.

As for the potential for conflicts with other providers, I did notice this when I submitted my changes to this project, but it appeared to be a general issue, and I am glad to see that it has been raised in xdg-specs#75.

I don't think I can help much here beyond testing any changes, but I would definitely like to see this issue resolved across all Secret Service providers.

@michaelk83
Copy link
Author

michaelk83 commented Dec 28, 2022

I don't think I can help much here beyond testing any changes

Hi @aidalgol , I was thinking that since you were the one who contributed the current .service files and corresponding readme updates in #28 , you could make the necessary updates as noted above. If you have the time and will for it, of course. I don't use pass myself, but I could help to review any changes.

(The corresponding fixes in other providers would have to be left to those other providers' teams, but one provider fixed would still be better than zero.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants