Chdir() to the configuration directory instead of /.
[tinc] / src / tincd.c
index 14a0c11..3bc17e2 100644 (file)
@@ -43,8 +43,6 @@
 #include <time.h>
 #endif
 
-#include <getopt.h>
-
 #include "conf.h"
 #include "control.h"
 #include "crypto.h"
@@ -340,11 +338,12 @@ 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,
                           BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR);
-               printf("Copyright (C) 1998-2014 Ivo Timmermans, Guus Sliepen and others.\n"
+               printf("Copyright (C) 1998-2015 Ivo Timmermans, Guus Sliepen and others.\n"
                                "See the AUTHORS file for a complete list.\n\n"
                                "tinc comes with ABSOLUTELY NO WARRANTY.  This is free software,\n"
                                "and you are welcome to redistribute it under certain conditions;\n"