Skip to content

server: Use a separate binary to keep PAM password around #494

Merged
bilelmoussaoui merged 13 commits into
mainfrom
bilelmoussaoui/fix-server
Jun 21, 2026
Merged

server: Use a separate binary to keep PAM password around #494
bilelmoussaoui merged 13 commits into
mainfrom
bilelmoussaoui/fix-server

Conversation

@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

See commits.

Because we want the service to be started when the session starts. Otherwise we won't be able
to pass the PAM secret if auto login is enabled to the daemon binary.
Currently, we used to fork/exec the daemon from pam module, pass it the
secret through stdin, till oo7-daemon is started by systemd which would
pass the dbus session bus env variable back to the main fork/exec
oo7-daemon process so it can start the session. That ended up being a
racy implementation.

Instead, use a separate helper binary for fork/exec, make it store the
secret and pass it to oo7-daemon once it is up and ready through a memfd
passed via SCM_RIGHTS on a Unix socket.
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/fix-server branch from c347b38 to 0a31584 Compare June 17, 2026 21:42
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown

📊 Code Coverage Report

Metric Value
Current PR Coverage 86.45%
Main Branch Coverage 88.27%
Coverage Change 📉 -1.82%

⚠️ Warning: Coverage decreased by more than 1%

Coverage report generated by cargo-tarpaulin

By making a shared helper and use it all over the place.
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/fix-server branch from 89858d9 to 5641ead Compare June 21, 2026 11:18
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/fix-server branch from 5641ead to 6be6262 Compare June 21, 2026 11:33
Ignore SIGPIPE and reset SIGCHLD to SIG_DFL before forking to prevent
broken pipes from killing the login manager and ensure waitpid works
correctly.
Instead do it after 1m of being unused
The collections mutex was held while registering objects on D-Bus via
object_server.at(). Incoming D-Bus calls during registration could try
to acquire the same lock, causing a deadlock.
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/fix-server branch 4 times, most recently from cec593c to 83ab991 Compare June 21, 2026 19:06
When running over ssh, there is no prompter available so you won't be
able to unlock the keyring and access your precious data. secret-tool
used an internal iface that is only implemented by gnome-keyring-daemon.

Instead, mimic the iface used by plasma (which is the direction we
should take in the future for prompting) and implement something basic
as a fallback for cli usage.

That makes oo7-cli usable from cli just fine in those edge cases.
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/fix-server branch from 83ab991 to 9477d29 Compare June 21, 2026 19:29
@bilelmoussaoui bilelmoussaoui merged commit dffbf84 into main Jun 21, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

1 participant