Commit 4c52ef8a authored by Alexander Gerasiov's avatar Alexander Gerasiov

Add 0014-Set-default-umask-to-027.patch.

Signed-off-by: Alexander Gerasiov's avatarAlexander GQ Gerasiov <gq@cs.msu.su>
parent 63416a8e
From: Alexander GQ Gerasiov <gq@cs.msu.su>
Date: Thu, 31 Jan 2019 00:29:50 +0300
Subject: Set default umask to 027.
Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>
---
libs/libdaemon/src/BaseDaemon.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libs/libdaemon/src/BaseDaemon.cpp b/libs/libdaemon/src/BaseDaemon.cpp
index bad38c7..696f686 100644
--- a/libs/libdaemon/src/BaseDaemon.cpp
+++ b/libs/libdaemon/src/BaseDaemon.cpp
@@ -887,16 +887,15 @@ void BaseDaemon::initialize(Application & self)
reloadConfiguration();
/// This must be done before creation of any files (including logs).
+ mode_t umask_num = 0027;
if (config().has("umask"))
{
std::string umask_str = config().getString("umask");
- mode_t umask_num = 0;
std::stringstream stream;
stream << umask_str;
stream >> std::oct >> umask_num;
-
- umask(umask_num);
}
+ umask(umask_num);
DB::ConfigProcessor(config_path).savePreprocessedConfig(loaded_config, "");
......@@ -11,3 +11,4 @@
0011-Change-libraries-hierarchy-links-most-of-them-into-m.patch
0012-Correctly-find-and-use-system-metrohash-library.patch
0013-server-config.xml-Set-log-level-to-warning.patch
0014-Set-default-umask-to-027.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment