summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 13:50:31 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 13:50:31 +0200
commit0b8d807bf675189fd496b6313283d58f917368d9 (patch)
treedb2a9b27d330aa836c61c280b11d156a4c36aa75 /src/fastd.c
parentb82c6ed0cbbb4f3535be050652594d1ee1bfcf7a (diff)
downloadfastd-0b8d807bf675189fd496b6313283d58f917368d9.tar
fastd-0b8d807bf675189fd496b6313283d58f917368d9.zip
Don't initialize peers before dropping privileges
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 6eea3f0..13c28ba 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -1332,9 +1332,6 @@ int main(int argc, char *argv[]) {
init_tuntap(&ctx);
init_peer_groups(&ctx);
- fastd_config_load_peer_dirs(&ctx, &conf);
- init_peers(&ctx);
-
if (conf.daemon) {
pid_t pid = fork();
if (pid < 0) {
@@ -1362,6 +1359,9 @@ int main(int argc, char *argv[]) {
else if (conf.drop_caps == DROP_CAPS_OFF)
set_user(&ctx);
+ fastd_config_load_peer_dirs(&ctx, &conf);
+ init_peers(&ctx);
+
while (!terminate) {
handle_tasks(&ctx);