From 3e360338f6fa12d6713c5688618e1e1177c3ca57 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Tue, 12 Jan 2010 11:57:01 -0500
Subject: [PATCH] Trust umask for file permissions

Open output files with mode 0666 so that permissions are not more strict
than umask permits.  See issue #10126.
---
 ProcessUNIX.c        | 5 ++---
 kwsysDateStamp.cmake | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index 79716a1..373e906 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -1875,9 +1875,8 @@ static int kwsysProcessSetupOutputPipeFile(int* p, const char* name)
   /* Close the existing descriptor.  */
   kwsysProcessCleanupDescriptor(p);
 
-  /* Open a file for the pipe to write (permissions 644).  */
-  if((fout = open(name, O_WRONLY | O_CREAT | O_TRUNC,
-                  S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+  /* Open a file for the pipe to write.  */
+  if((fout = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
     {
     return 0;
     }
diff --git a/kwsysDateStamp.cmake b/kwsysDateStamp.cmake
index f317190..22351cb 100644
--- a/kwsysDateStamp.cmake
+++ b/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR  2010)
 SET(KWSYS_DATE_STAMP_MONTH 01)
 
 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   06)
+SET(KWSYS_DATE_STAMP_DAY   12)
-- 
GitLab