diff options
| author | AwfulCrawler <AwfulCrawler@users.noreply.github.com> | 2016-04-18 13:58:22 +1200 |
|---|---|---|
| committer | AwfulCrawler <AwfulCrawler@users.noreply.github.com> | 2016-04-18 13:58:22 +1200 |
| commit | 2d9dfd082096429b4b1876aff8cb8c76f93b7b10 (patch) | |
| tree | 3665fcb864eabc32a754c7bfddc90a3c672dd598 /src/common | |
| parent | abea280dd3df0c0f6d67a930eb2ffe5b73255fa9 (diff) | |
| parent | 1c66fe04bcebf50102abe6c96322f0fa5ce740ec (diff) | |
| download | monzero-core-2d9dfd082096429b4b1876aff8cb8c76f93b7b10.tar.gz monzero-core-2d9dfd082096429b4b1876aff8cb8c76f93b7b10.tar.xz monzero-core-2d9dfd082096429b4b1876aff8cb8c76f93b7b10.zip | |
Merge pull request #1 from monero-project/master
Catch up with Monero master
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/util.cpp | 9 | ||||
| -rw-r--r-- | src/common/util.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index 6f75e5bad..2337f5766 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -413,4 +413,13 @@ std::string get_nix_version_display_string() } return false; } + void set_strict_default_file_permissions(bool strict) + { +#if defined(__MINGW32__) || defined(__MINGW__) + // no clue about the odd one out +#else + mode_t mode = strict ? 077 : 0; + umask(mode); +#endif + } } diff --git a/src/common/util.h b/src/common/util.h index 7554b1df7..ed1c16cb0 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -158,4 +158,6 @@ namespace tools /*! \brief where the installed handler is stored */ static std::function<void(int)> m_handler; }; + + void set_strict_default_file_permissions(bool strict); } |
