Skip to content

daemon/gdm-session-record.c: open/close the utmp database

Jason Pleau requested to merge jpleau/gdm:fix_issue_381 into master

pututxline() was used without first opening the utxmp database and without closing it, preventing the logout entry from being fully committed.

This caused the number of logged-in users to increment after each login, as logging out did not correctly remove the user login record from utmp.

This commit wraps pututxline() between setutxent() and endutxent(), making sure that the login/logout operation are fully flushed.

Fixes #381 (closed)

Edited by Jason Pleau

Merge request reports