1
0
Fork 0

Document that property write-protection is not a security measure

(Nasal can remove it)
This commit is contained in:
Rebecca N. Palmer 2015-03-13 18:11:29 +00:00
parent a4aff2cb82
commit 16784d590a
2 changed files with 7 additions and 3 deletions

View file

@ -446,8 +446,9 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
exportDir.create(0755);
}
// Set /sim/fg-home and don't allow malign code to override it until
// Nasal security is set up. Use FG_HOME if necessary.
// Set /sim/fg-home. Use FG_HOME if necessary.
// deliberately not a tied property, for fgValidatePath security
// write-protect to avoid accidents
SGPropertyNode *home = fgGetNode("/sim", true);
home->removeChild("fg-home", 0);
home = home->getChild("fg-home", 0, true);
@ -486,6 +487,8 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
static void initAircraftDirsNasalSecurity()
{
// deliberately not a tied property, for fgValidatePath security
// write-protect to avoid accidents
SGPropertyNode* sim = fgGetNode("/sim", true);
sim->removeChildren("fg-aircraft");

View file

@ -273,7 +273,8 @@ void FGGlobals::set_fg_root (const std::string &root) {
<< fg_root << "'\n***\n***");
}
// remove /sim/fg-root before writing to prevent hijacking
// deliberately not a tied property, for fgValidatePath security
// write-protect to avoid accidents
SGPropertyNode *n = fgGetNode("/sim", true);
n->removeChild("fg-root", 0);
n = n->getChild("fg-root", 0, true);