diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 13:50:31 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 13:50:31 +0200 |
commit | 0b8d807bf675189fd496b6313283d58f917368d9 (patch) | |
tree | db2a9b27d330aa836c61c280b11d156a4c36aa75 /src | |
parent | b82c6ed0cbbb4f3535be050652594d1ee1bfcf7a (diff) | |
download | fastd-0b8d807bf675189fd496b6313283d58f917368d9.tar fastd-0b8d807bf675189fd496b6313283d58f917368d9.zip |
Don't initialize peers before dropping privileges
Diffstat (limited to 'src')
-rw-r--r-- | src/fastd.c | 6 |
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); |