Skip to content

Bug: duplicate-login check is too strict #79

@kavau

Description

@kavau

Duplicate-login check is too strict: After logging out of seat1, attempting to log into seat0 fails repeatedly with "User already logged in on another seat".

bus_user_logged_in_elsewhere() queries logind's ListSessions to detect duplicate logins. Logind processes the session-end notification (FIFO EOF from session_cleanup()) asynchronously. The false positive could happen if the session teardown takes an unexpectedly long time or never completes due to a bug, or if any child processes fail to exit. Hence the check is very brittle.

Proposed fix:

Replace the logind ListSessions query with a walk of atrium's own seat table, checking other->state == SEAT_SESSION && other->auth.uid == uid. Internal seat state is updated synchronously in session_cleanup(), so the race disappears entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:daemonDaemon core: event loop, signal handling, main.c wiringbugSomething isn't workingnextShould be worked on immediately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions