Fix session start time detection on Debian 12 #19
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/evomaintenance#19
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix-deb12"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fix #18
From Debian 12 onwards
sudo
cause a newutmp
login record to be created, breaking the expectations ofget_begin_date()
, causing the wrong time to be detected as the session start time.Let's move to using
loginctl --property=Timestamp show-session $(cat /proc/self/sessionid)
on Debian 12 (and up) to get the start time to fix this issue.(Technically this could be used for Debian 8+.)
LGTM!