[lfs] branch trunk updated: shadow: rewrite the description for --disable-logind

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <176836552143.7641.18267639299043159497@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository lfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 54011db0c shadow: rewrite the description for --disable-logind
54011db0c is described below

commit 54011db0c0fde0fe7d96f17a0abe0f56eeb98a71
Author: Xi Ruoyao <[email protected]>
AuthorDate: Wed Jan 14 12:34:03 2026 +0800

    shadow: rewrite the description for --disable-logind
    
    The logind integration does not add new tools, but improves existing
    tools (logind and who) so they'll work after 2038.  Thus "does not
    provide any utility" is not a good reason.
    
    Just admit the known Y2038 issue here.  We'll need to take some action
    before 2038 to resolve it.
---
 chapter07/createfiles.xml | 13 +++++++------
 chapter08/shadow.xml      | 34 ++++++++++++++++++++++++++++++----
 2 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml
index 319c89138..acae0cfb2 100644
--- a/chapter07/createfiles.xml
+++ b/chapter07/createfiles.xml
@@ -221,18 +221,19 @@ chmod -v 600  /var/log/btmp</userinput></screen>
   failed login attempts.  The <filename>/var/log/btmp</filename> file records
   the bad login attempts.</para>
 
-  <!-- systemd no longer creates this -->
-  <note revision='sysv'><para>The <filename>/run/utmp</filename> file
-  records the users that are currently logged in.  This file is created
-  dynamically in the boot scripts.</para></note>
+  <note><para>The <filename>/run/utmp</filename> file
+  records the users that are currently logged in.
+  <phrase revision='sysv'>This file is created dynamically in the boot
+  scripts.</phrase><phrase revision='systemd'>This file is created
+  dynamically when a user logs into the system.</phrase></para></note>
 
   <!-- AFAIK they are not vital for system function, users requiring such
        info should rely on systemd-logind or elogind or some custom PAM
        module.  Maybe we can stop to create them at all.  -->
   <note>
     <para>
-      The <phrase revision='sysv'><filename>utmp</filename>,
-      </phrase><filename>wtmp</filename>, <filename>btmp</filename>, and
+      The <filename>utmp</filename>,
+      <filename>wtmp</filename>, <filename>btmp</filename>, and
       <filename>lastlog</filename> files use 32-bit integers for timestamps
       and they'll be fundamentally broken after year 2038.  Many packages
       have stopped using them and other packages are going to stop using
diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml
index fb561cf6f..637a73017 100644
--- a/chapter08/shadow.xml
+++ b/chapter08/shadow.xml
@@ -144,10 +144,36 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;</userinput></s
       <varlistentry>
         <term><parameter>--disable-logind</parameter></term>
         <listitem>
-           <para>This option is not needed at this point in LFS, 
-           as it requires systemd and doesn't provide any utility to 
-           users at this stage.</para>
-        </listitem>
+          <para>This option makes Shadow (specifically, the
+          <command>login</command> and <command>who</command> programs) use
+          the <filename>/run/utmp</filename> file instead of logind to track
+          the active login sessions, as logind isn't available yet in the
+          incomplete LFS system.  But as we've discussed in
+          <xref linkend='ch-tools-createfiles'/>, the
+          <filename>/run/utmp</filename> file format will be completely
+          broken after year 2038.  The LFS editors will attempt to resolve
+          the issue before that year.</para>
+        </listitem>
+
+        <!-- TODO: How?  IMO maybe just rebuild shadow after systemd/elogind
+             (then elogind will be need to copied from BLFS but without the
+             recommended dependencies; perhaps PAM will need to be moved
+             as well).
+
+             And we cannot move the first shadow build to chapter 7 because
+             it still needs libxcrypt.  Oh man.
+
+             The second option is simply moving shadow to the end of
+             chapter 8 and using a small custom helper instead of su for
+             running the testsuite as &tester;.  Still needing elogind and
+             maybe PAM.
+
+             The third option may be simply taking out the session tracking
+             functionality here by making get_session_host() and
+             active_sessions_count() dummies simply returning zero if
+             building w/o logind, and telling the users who need this
+             functionality to rebuild shadow in BLFS with all the
+             recommended dependencies.  -->
       </varlistentry>
 
       <varlistentry>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.