Fix session start time detection on Debian 12 #19

Merged
bwaegeneire merged 1 commit from fix-deb12 into master 2024-09-17 14:07:22 +02:00
Owner

fix #18

From Debian 12 onwards sudo cause a new utmp login record to be created, breaking the expectations of get_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+.)

fix #18 From Debian 12 onwards `sudo` cause a new `utmp` login record to be created, breaking the expectations of `get_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+.)
mtrossevin added the
bug
label 2024-09-16 13:16:00 +02:00
mtrossevin self-assigned this 2024-09-16 13:16:00 +02:00
mtrossevin added 1 commit 2024-09-16 13:16:00 +02:00
requested reviews from jlecour, bwaegeneire 2024-09-16 13:19:50 +02:00
Owner

LGTM!

LGTM!
removed review request for bwaegeneire 2024-09-16 17:30:54 +02:00
bwaegeneire merged commit 6b8cf29a08 into master 2024-09-17 14:07:22 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: evolix/evomaintenance#19
No description provided.