[lfs] 02/02: Move the explanation of umask 022 from settingenviron to aboutlfs

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

git pushed a commit to branch trunk
in repository lfs.

commit 39679232f7a6ebfcd5d9a410b26cf0e3c7cabe00
Author: Xi Ruoyao <[email protected]>
AuthorDate: Sun Jan 12 11:55:59 2025 +0800

    Move the explanation of umask 022 from settingenviron to aboutlfs
    
    Explain it once we use it.  Also fix an error in the text (we don't make
    files executable, we only make directories searchable).
---
 chapter02/aboutlfs.xml       | 10 ++++++++++
 chapter04/settingenviron.xml |  7 ++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/chapter02/aboutlfs.xml b/chapter02/aboutlfs.xml
index 158f8f3a5..f46d4e3ba 100644
--- a/chapter02/aboutlfs.xml
+++ b/chapter02/aboutlfs.xml
@@ -33,6 +33,16 @@
   default:</para>
 
 <screen role="nodump"><userinput>umask 022</userinput></screen>
+
+  <para>Setting the umask to 022 ensures that newly created files and
+  directories are only writable by their owner, but are readable and
+  searchable (only for directories) by anyone (assuming default modes are
+  used by the <ulink role='man' url='&man;open.2'>open(2)</ulink> system
+  call, new files will end up with permission mode 644 and directories with
+  mode 755).  An over-permissive default can leave security holes in the
+  LFS system, and an over-restrictive default can cause strange issues
+  building or using the LFS system.</para>
+
   <caution>
   <para>Do not forget to check that <envar>LFS</envar> is set and the
   umask is set to <literal>022</literal> whenever
diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml
index b179bb0b3..564e29d84 100644
--- a/chapter04/settingenviron.xml
+++ b/chapter04/settingenviron.xml
@@ -76,11 +76,8 @@ EOF</userinput></screen>
     <varlistentry>
       <term><parameter>umask 022</parameter></term>
       <listitem>
-  <para>Setting the user file-creation mask (umask) to 022 ensures that newly
-  created files and directories are only writable by their owner, but are
-  readable and executable by anyone (assuming default modes are used by the
-  <ulink role='man' url='&man;open.2'>open(2)</ulink> system call, new files
-  will end up with permission mode 644 and directories with mode 755).</para>
+        <para>Setting the umask as we've already explained in
+        <xref linkend='ch-partitioning-aboutlfs' role='.'/></para>
       </listitem>
     </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.