diff options
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r-- | src/anytun.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp index 84e5582..ab847a8 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -338,7 +338,9 @@ int main(int argc, char* argv[]) } #ifndef NO_DAEMON - PrivInfo privs(gOpt.getUsername(), gOpt.getGroupname()); +#ifndef NO_PRIVDROP + PrivInfo privs(gOpt.getUsername(), gOpt.getGroupname()); +#endif std::ofstream pidFile; if(gOpt.getPidFile() != "") { @@ -404,9 +406,9 @@ int main(int argc, char* argv[]) #ifndef NO_DAEMON if(gOpt.getChrootDir() != "") do_chroot(gOpt.getChrootDir()); - +#ifndef NO_PRIVDROP privs.drop(); - +#endif if(gOpt.getDaemonize()) { daemonize(); daemonized = true; |