Skip to content

Fix /var/log/wtmp not updating on session exit#56916

Closed
atburke wants to merge 3 commits intomasterfrom
atburke/uacc-logout
Closed

Fix /var/log/wtmp not updating on session exit#56916
atburke wants to merge 3 commits intomasterfrom
atburke/uacc-logout

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Jul 17, 2025

This change fixes a bug where the user accounting log file (/var/log/wtmp) would not be updated when a session finished.

Fixes #54606.

Changelog: Fixed /var/log/wtmp not updating on session exit

Comment on lines +343 to +345
// For reasons beyond me, updwtmp() returns ENOENT even when it's completely
// successful. When that happens, this function checks if f's target file was
// modified. If it was, assume that the ENOENT is spurious.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check if the entry we wanted to add is in the file, instead? Basing this off of the mtime is racey, at a minimum.

Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we come up with a solution to this issue that doesn't result in spurious ENOENTs?

@atburke
Copy link
Copy Markdown
Contributor Author

atburke commented Aug 14, 2025

closed in favor of #57875

@atburke atburke closed this Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/var/log/wtmp not updated on session exit

3 participants