Skip to content
Permalink
Browse files Browse the repository at this point in the history
make drachtio log file not globally readable (#241)
  • Loading branch information
davehorton committed Nov 23, 2022
1 parent 860f025 commit f791a93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/controller.cpp
Expand Up @@ -68,6 +68,7 @@ THE SOFTWARE.
#include <boost/log/sinks.hpp>
#include <boost/log/sources/logger.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>

#if defined(__clang__)
#pragma clang diagnostic pop
Expand Down Expand Up @@ -1006,6 +1007,13 @@ namespace drachtio {
));

logging::core::get()->add_sink(m_sinkTextFile);
boost::filesystem::permissions(name,
boost::filesystem::perms::owner_read |
boost::filesystem::perms::owner_write |
boost::filesystem::perms::group_read |
boost::filesystem::perms::group_write
);

}
logging::core::get()->set_filter(
expr::attr<severity_levels>("Severity") <= m_current_severity_threshold
Expand Down

0 comments on commit f791a93

Please sign in to comment.