summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-05-19 16:16:10 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-05-19 16:16:10 -0700
commitfb71a6e2b4074270bbdf5baaf3f2e6e0a26ad3e9 (patch)
tree9e8a34edd9dac01e4ff3f4faee5f07c01d7edd0d
parent5e6a2a17b02904b5349f379ff6f6d91a4c849067 (diff)
downloadinfinitytier-fb71a6e2b4074270bbdf5baaf3f2e6e0a26ad3e9.tar.gz
infinitytier-fb71a6e2b4074270bbdf5baaf3f2e6e0a26ad3e9.zip
skipRootCheck should also prevent dropping of privs on Linux
-rw-r--r--one.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/one.cpp b/one.cpp
index 1f38361f..93504cfb 100644
--- a/one.cpp
+++ b/one.cpp
@@ -1488,7 +1488,8 @@ int main(int argc,char **argv)
#ifdef __UNIX_LIKE__
#ifdef ZT_HAVE_DROP_PRIVILEGES
- dropPrivileges(argv[0],homeDir);
+ if (!skipRootCheck)
+ dropPrivileges(argv[0],homeDir);
#endif
std::string pidPath(homeDir + ZT_PATH_SEPARATOR_S + ZT_PID_PATH);