]> tinc-vpn.org Git - tinc/blobdiff - src/tincd.c
Chdir() to the configuration directory instead of /.
[tinc] / src / tincd.c
index eb03165f357edb71565bf38b5b9082fb8a9f02f6..3bc17e233fd34f69c77dc094f1c91499a0ccd938 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,