From 6e11fe27286d9202280771ad1a402657e67ee065 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 30 Sep 2023 16:11:57 +0800 Subject: [PATCH] createfiles: Add Y2038 info about the traditional {b,u,w}tmp and lastlog files And utmp does not exist on systemd-based LFS. --- chapter07/createfiles.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 2b752b944..ec4b0eee2 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -215,8 +215,23 @@ chmod -v 600 /var/log/btmp failed login attempts. The /var/log/btmp file records the bad login attempts. - The /run/utmp file records the users that - are currently logged in. This file is created dynamically in the boot - scripts. + + The /run/utmp file + records the users that are currently logged in. This file is created + dynamically in the boot scripts. + + + + + The utmp, + wtmp, btmp, and + lastlog files use 32-bit integers for timestamp + and they'll be fundamentally broken after year 2038. Many packages + have stopped using them and other packages are going to stop using + them. Do not rely on the contents of them for anything. + +