Chdir() to the configuration directory instead of /.
[tinc] / src / tincd.c
index eb03165..3bc17e2 100644 (file)
@@ -43,8 +43,6 @@
 #include <time.h>
 #endif
 
-#include <getopt.h>
-
 #include "conf.h"
 #include "control.h"
 #include "crypto.h"
@@ -340,6 +338,7 @@ int main(int argc, char **argv) {
                return 1;
 
        make_names(true);
+       chdir(confbase);
 
        if(show_version) {
                printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE,