From 5a7f263cecef7ae824e44947ec3d58284be55b00 Mon Sep 17 00:00:00 2001
From: manfred99 <manfred99@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Fri, 31 Jul 2009 22:30:10 +0000
Subject: [PATCH] smartd.cpp: Adjust umask

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2867 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/CHANGELOG  | 2 ++
 smartmontools/smartd.cpp | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index 5540f0d16..682a6f405 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -42,6 +42,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [MS] smartd.cpp: Adjust umask
+
   [CF] Makefile.am: Remove 'uninstall-docsDATA' target to fix
        'make distcheck' with automake 1.11. The 'make uninstall'
        of examplescripts fails if docdir does no longer exist.
diff --git a/smartmontools/smartd.cpp b/smartmontools/smartd.cpp
index 794aef55e..cc4792ce6 100644
--- a/smartmontools/smartd.cpp
+++ b/smartmontools/smartd.cpp
@@ -1281,7 +1281,7 @@ void DaemonInit(){
     // stderr
     NO_warn_unused_result(dup(i));
   };
-  umask(0);
+  umask(0022);
   NO_warn_unused_result(chdir("/"));
 
   if (do_fork)
-- 
GitLab