summaryrefslogtreecommitdiff
path: root/osdep/OSUtils.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-30 12:05:56 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-30 12:05:56 -0700
commit1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c (patch)
tree101d0dbd2b22c4b27fce718f250fdef92dffaa21 /osdep/OSUtils.cpp
parent6f46f0e0e1f0dd01f0e7bdaa700b11d2c54d0794 (diff)
downloadinfinitytier-1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c.tar.gz
infinitytier-1e3d5c4d87ce6e92bbb42d0f9675ec36f9e4929c.zip
Suppress icacls output on lockDownFile().
Diffstat (limited to 'osdep/OSUtils.cpp')
-rw-r--r--osdep/OSUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp
index 0ff7bfc4..45fbf100 100644
--- a/osdep/OSUtils.cpp
+++ b/osdep/OSUtils.cpp
@@ -125,7 +125,7 @@ void OSUtils::lockDownFile(const char *path,bool isDir)
startupInfo.cb = sizeof(startupInfo);
memset(&startupInfo,0,sizeof(STARTUPINFOA));
memset(&processInfo,0,sizeof(PROCESS_INFORMATION));
- if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /inheritance:d /Q").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) {
+ if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /inheritance:d /Q").c_str(),NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo)) {
WaitForSingleObject(processInfo.hProcess,INFINITE);
CloseHandle(processInfo.hProcess);
CloseHandle(processInfo.hThread);
@@ -134,7 +134,7 @@ void OSUtils::lockDownFile(const char *path,bool isDir)
startupInfo.cb = sizeof(startupInfo);
memset(&startupInfo,0,sizeof(STARTUPINFOA));
memset(&processInfo,0,sizeof(PROCESS_INFORMATION));
- if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /remove *S-1-5-32-545 /Q").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) {
+ if (CreateProcessA(NULL,(LPSTR)(std::string("C:\\Windows\\System32\\icacls.exe \"") + path + "\" /remove *S-1-5-32-545 /Q").c_str(),NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo)) {
WaitForSingleObject(processInfo.hProcess,INFINITE);
CloseHandle(processInfo.hProcess);
CloseHandle(processInfo.hThread);