diff options
| author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-26 10:21:43 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-01-26 10:21:43 -0800 |
| commit | 22efa1ab53fcd484657161841468810b43ea1d0d (patch) | |
| tree | 466c27b67bb148a6c8c5b37017cbe91addd3e9f6 /node/Node.cpp | |
| parent | f19d1e253afe690075bb311e708844b8a026fa36 (diff) | |
| download | infinitytier-22efa1ab53fcd484657161841468810b43ea1d0d.tar.gz infinitytier-22efa1ab53fcd484657161841468810b43ea1d0d.zip | |
Windows Installer work, fix 100% CPU bug in EthernetTap on Windows, Windows lockDownFile() implementation that uses 'cacls' utility.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index d195b9f1..e55cad04 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -419,12 +419,16 @@ Node::ReasonForTermination Node::run() } Utils::lockDownFile(identitySecretPath.c_str(),false); - // Make sure networks.d exists + // Make sure networks.d exists and is secure + { + std::string networksDotD(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d"); #ifdef __WINDOWS__ - CreateDirectoryA((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),NULL); + CreateDirectoryA(networksDotD.c_str(),NULL); #else - mkdir((_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str(),0700); + mkdir(networksDotD.c_str(),0700); #endif + Utils::lockDownFile(networksDotD.c_str(),true); + } // Load or generate config authentication secret std::string configAuthTokenPath(_r->homePath + ZT_PATH_SEPARATOR_S + "authtoken.secret"); |
