summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-02-18 10:17:44 +0000
committerOthmar Gsenger <otti@anytun.org>2009-02-18 10:17:44 +0000
commit9743a080833f6de98884708112dcfb0a3fed37dd (patch)
treef1cad9a890e3a258d7ae63efffa5dda785e8226a /src/anytun.cpp
parentadded strip Makefile target (diff)
static build mostly fixed
getsddrinfo still needs libc
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp8
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;