Security: more conservative dir permission masks.
Use 0755 instead of 077 everywhere we create a directory.
This commit is contained in:
parent
52f2f5ff78
commit
5cf8157a66
3 changed files with 4 additions and 4 deletions
|
@ -212,7 +212,7 @@ void FGGroundNetwork::saveElevationCache()
|
|||
airport[0], airport[1], airport[2]);
|
||||
cacheData.append(buffer);
|
||||
if (!cacheData.exists()) {
|
||||
cacheData.create_dir(0777);
|
||||
cacheData.create_dir(0755);
|
||||
}
|
||||
cacheData.append(airport + "-groundnet-cache.txt");
|
||||
cachefile.open(cacheData.str().c_str());
|
||||
|
@ -300,7 +300,7 @@ void FGGroundNetwork::parseCache()
|
|||
airport[0], airport[1], airport[2]);
|
||||
cacheData.append(buffer);
|
||||
if (!cacheData.exists()) {
|
||||
cacheData.create_dir(0777);
|
||||
cacheData.create_dir(0755);
|
||||
}
|
||||
int index;
|
||||
double elev;
|
||||
|
|
|
@ -436,7 +436,7 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
|
|||
|
||||
simgear::Dir exportDir(simgear::Dir(dataPath).file("Export"));
|
||||
if (!exportDir.exists()) {
|
||||
exportDir.create(0777);
|
||||
exportDir.create(0755);
|
||||
}
|
||||
|
||||
// Set /sim/fg-home and don't allow malign code to override it until
|
||||
|
|
|
@ -455,7 +455,7 @@ void FGTrafficManager::shutdown()
|
|||
airport[0], airport[1], airport[2]);
|
||||
cacheData.append(buffer);
|
||||
if (!cacheData.exists()) {
|
||||
cacheData.create_dir(0777);
|
||||
cacheData.create_dir(0755);
|
||||
}
|
||||
cacheData.append(airport + "-cache.txt");
|
||||
//cerr << "Saving AI traffic heuristics" << endl;
|
||||
|
|
Loading…
Add table
Reference in a new issue