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

Hardcoded User=nemo is likely wrong #301

Closed
Olf0 opened this issue Apr 9, 2022 · 5 comments · Fixed by #473
Closed

Hardcoded User=nemo is likely wrong #301

Olf0 opened this issue Apr 9, 2022 · 5 comments · Fixed by #473
Labels
enhancement Is supposed to enhance something

Comments

@Olf0
Copy link
Member

Olf0 commented Apr 9, 2022

See https:/storeman-developers/harbour-storeman/blob/devel/data/harbour.storeman.service#L4
But I have no idea how to fix it.

@Olf0 Olf0 added help wanted Support is needed to proceed information needed More information is needed to address this labels Apr 9, 2022
@nephros
Copy link
Collaborator

nephros commented Jul 15, 2022

I don't quite understand whether it is needed.

The D-BUS spec says a User= is required IF the service is a "system" service.
Not so apparently if we are a "session" service.

I looks to me as if running as Session would be enough, correct?

References:
D-Bus spec (search for "Exec").
DBus daemon

@Olf0
Copy link
Member Author

Olf0 commented Jul 16, 2022

I looks to me as if running as Session would be enough, correct?

While your line of thinking sounds reasonable, my honest answer has to be, "I have no idea!".
As asking mentaljam is basically futile, we may create a beta-branch and -release to test omitting User=nemo in this [D-BUS Service] configuration file.

@nephros
Copy link
Collaborator

nephros commented Jul 18, 2022

I believe once we got Sailjail working properly, that whole file can go away and we just use the ExecDBus= key from the Sailjail config - which obviously will take care of the user determination problem.
A dbus .service file might still be needed but I'll find out.

nephros pushed a commit to nephros/harbour-storeman that referenced this issue Jul 22, 2022
User= specification is only needed for system services, this runs on the
session bus.

Fixes: storeman-developers#301
@Olf0
Copy link
Member Author

Olf0 commented Jul 30, 2023

I believe once we got Sailjail working properly, that whole file can go away and we just use the ExecDBus= key from the Sailjail config - which obviously will take care of the user determination problem.

Unfortunately this is not the case, because …

  1. a SailJail configuration only exists in the sfos4.2 branch (for SailfishOS ≥ 4.2.0), but defaultuser instead of nemo for fresh installations of SailfishOS was introduced with SFOS 3.4.0.
  2. we just decided to cease any further efforts to implement a "proper" SailJail configuration (hence leave it as simply and stubbornly Disabled).

A dbus .service file might still be needed but I'll find out.

AFAIU you did (thank you!) and committed 5b04260 to your branch harbour-storeman:dbus-user-nemo.

If this is all it takes, I will merge this change.

P.S.: Do you have an idea, which functionality might break, if this D-Bus service is not working properly? Background: All my devices have nemo as primary user, hence I was not able to detect anything not working properly due to this user-name mismatch; after employing this change I might, if I know what to look at.

@Olf0
Copy link
Member Author

Olf0 commented Aug 10, 2023

A dbus .service file might still be needed but I'll find out.

AFAIU you did (thank you!) and committed 5b04260 to your branch harbour-storeman:dbus-user-nemo.

If this is all it takes, I will merge this change.

@nephros, is it?

P.S.: Do you have an idea, which functionality might break, if this D-Bus service is not working properly? Background: All my devices have nemo as primary user, hence I was not able to detect anything not working properly due to this user-name mismatch; after employing this change I might, if I know what to look at.

@Olf0 Olf0 closed this as completed in #473 Mar 23, 2024
Olf0 added a commit that referenced this issue Mar 23, 2024
`User=` specification is only needed for "system" (i.e. system-wide)
message buses, but this runs on a "session" (i.e.
per-user-login-session) bus.

Fixes: #301

References: 
- [D-Bus
Specification](https://dbus.freedesktop.org/doc/dbus-specification.html#id-1.13.5.11.5)
- Man-page for `dbus-daemon`, [section "configuration
file"](https://dbus.freedesktop.org/doc/dbus-daemon.1.html#configuration_file)
and examples in [section "integrating session
services"](https://dbus.freedesktop.org/doc/dbus-daemon.1.html#session_services)
Olf0 added a commit that referenced this issue Mar 23, 2024
* remove user specification from dbus service file
  User= specification is only needed for system services, this runs on the
session bus.
  Fixes: #301

* Post release version increase to 0.3.9 (#472)

* [harbour-storeman.spec] Post release version increase

* [harbour-storeman.changes] Add stub for v0.3.9

* [harbour-storeman.changes] Update for releasing v0.3.9

---------

Co-authored-by: nephros <nemo@pgxperiiia10>
@Olf0 Olf0 added enhancement Is supposed to enhance something and removed help wanted Support is needed to proceed information needed More information is needed to address this labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Is supposed to enhance something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants