From 16fa4d1d17dbd29b6d7f5b097bedcdec77c9457d Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 19 Dec 2013 14:56:23 +0000 Subject: [PATCH] Security: fix 0777 directory permissions to 0755. --- simgear/io/HTTPFileRequest.cxx | 2 +- simgear/props/props_io.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/io/HTTPFileRequest.cxx b/simgear/io/HTTPFileRequest.cxx index 33b7339a..69c89cdd 100644 --- a/simgear/io/HTTPFileRequest.cxx +++ b/simgear/io/HTTPFileRequest.cxx @@ -43,7 +43,7 @@ namespace HTTP // TODO validate path? (would require to expose fgValidatePath somehow to // simgear) SGPath path(_filename); - path.create_dir(0777); + path.create_dir(0755); _file.open(_filename.c_str(), std::ios::binary | std::ios::trunc); } diff --git a/simgear/props/props_io.cxx b/simgear/props/props_io.cxx index c86f9d6c..d44db098 100644 --- a/simgear/props/props_io.cxx +++ b/simgear/props/props_io.cxx @@ -616,7 +616,7 @@ writeProperties (const string &file, const SGPropertyNode * start_node, bool write_all, SGPropertyNode::Attribute archive_flag) { SGPath path(file.c_str()); - path.create_dir(0777); + path.create_dir(0755); ofstream output(file.c_str()); if (output.good()) { -- 2.39.5