texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: install-info: Invert umask in mode computation


From: Arsen Arsenović
Subject: branch master updated: install-info: Invert umask in mode computation
Date: Sun, 26 Feb 2023 09:14:46 -0500

This is an automated email from the git hooks/post-receive script.

arsen pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 38b4f126da install-info: Invert umask in mode computation
38b4f126da is described below

commit 38b4f126da5f348338837ff82b26499862e5fadc
Author: Arsen Arsenović <arsen@aarsen.me>
AuthorDate: Sun Feb 26 15:14:20 2023 +0100

    install-info: Invert umask in mode computation
    
    * install-info/install-info.c (output_dirfile): Invert umask
    applied to tempfile (as is specified in the definition for
    umasks).
---
 ChangeLog                   | 7 +++++++
 install-info/install-info.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 64f53ce952..dad365b2ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-02-26  Arsen Arsenović  <arsen@aarsen.me>
+
+       install-info: Invert umask in mode computation
+       * install-info/install-info.c (output_dirfile): Invert umask
+       applied to tempfile (as is specified in the definition for
+       umasks).
+
 2023-02-26  Arsen Arsenović  <arsen@aarsen.me>
 
        install-info: Relax tempfile mode earlier
diff --git a/install-info/install-info.c b/install-info/install-info.c
index b3258866c7..0899f8c683 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -933,7 +933,7 @@ output_dirfile (char *dirfile, int dir_nlines, struct 
line_data *dir_lines,
   /* Reset the mode that the file is set to.  */
   mode_t um = umask (0022);
   umask (um);
-  if (fchmod (tempfile, 0666 & um) < 0)
+  if (fchmod (tempfile, 0666 & ~um) < 0)
     {
       perror ("chmod");
       remove (tempname);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]