diff options
author | Martin Rehak <rehak@tekkirk.org> | 2019-09-02 09:57:09 +0200 |
---|---|---|
committer | Gaute Hope <eg@gaute.vetsj.com> | 2019-09-04 08:50:21 +0200 |
commit | 8d26d07e4dd71acca41cc8a8a74b767462a30765 (patch) | |
tree | b0fc438b58803bd86ee041152ff2ba41e9840b45 | |
parent | eb48a68ce682821fc49bc60b27649702db2e57fb (diff) |
Set restrictive permissions on socket directory.
-rw-r--r-- | src/config.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.cc b/src/config.cc index 586df33..bb967b4 100644 --- a/src/config.cc +++ b/src/config.cc @@ -1,6 +1,7 @@ # include <iostream> # include <stdlib.h> # include <functional> +# include <sys/stat.h> # include <boost/filesystem.hpp> # include <boost/filesystem/operations.hpp> @@ -343,7 +344,9 @@ namespace Astroid { if (!is_directory(std_paths.socket_dir)) { LOG (warn) << "cf: making socket dir.."; + mode_t um = umask (077); create_directories (std_paths.socket_dir); + umask (um); } if (!is_regular_file (std_paths.config_file)) { |