aboutsummaryrefslogtreecommitdiff
path: root/src/setup/gnunet-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup/gnunet-setup.c')
-rw-r--r--src/setup/gnunet-setup.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c
index 2bfc0b36..dfa0d71d 100644
--- a/src/setup/gnunet-setup.c
+++ b/src/setup/gnunet-setup.c
@@ -514,7 +514,25 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
514 GNUNET_DISK_file_test ("/etc/gnunet.conf")) 514 GNUNET_DISK_file_test ("/etc/gnunet.conf"))
515 (void) GNUNET_CONFIGURATION_load (cfg, "/etc/gnunet.conf"); 515 (void) GNUNET_CONFIGURATION_load (cfg, "/etc/gnunet.conf");
516 else 516 else
517 (void) GNUNET_CONFIGURATION_load (cfg, "~gnunet/.gnunet/gnunet.conf"); 517 {
518#if HAVE_GETPWNAM
519 struct passwd *pw;
520
521 pw = getpwnam ("gnunet");
522 if (NULL != pw)
523 {
524 char *cfgname;
525
526 GNUNET_asprintf (&cfgname,
527 "%s%s%s",
528 pw->pw_dir,
529 DIR_SEPARATOR_STR,
530 ".gnunet/gnunet.conf");
531 (void) GNUNET_CONFIGURATION_load (cfg, cfgname);
532 GNUNET_free (cfgname);
533 }
534#endif
535 }
518 (void) GNUNET_CONFIGURATION_parse (cfg, cfgName); 536 (void) GNUNET_CONFIGURATION_parse (cfg, cfgName);
519 } 537 }
520 else 538 else