Lock down individual files in networks.d instead of directory since directory ACLs are more complex on Windows.

This commit is contained in:
Adam Ierymenko 2014-01-26 10:32:12 -08:00
parent 22efa1ab53
commit 9d67a02b5f
2 changed files with 4 additions and 2 deletions

View file

@ -116,6 +116,8 @@ void Network::setConfiguration(const Dictionary &conf,bool saveToDisk)
std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".conf");
if (!Utils::writeFile(confPath.c_str(),conf.toString())) {
LOG("error: unable to write network configuration file at: %s",confPath.c_str());
} else {
Utils::lockDownFile(confPath.c_str(),false);
}
}
} else {
@ -368,6 +370,7 @@ void Network::_dumpMulticastCerts()
}
fclose(mcdb);
Utils::lockDownFile(mcdbPath.c_str(),false);
}
} // namespace ZeroTier