Rename setup_network_connections() and split out try_outgoing_connections()
In preparation of chroot/setuid operations, split out call to try_outgoing_connections() from setup_network_connections() (which was the last call in setup_network_connections()). This is because dropping privileges should be done in-between setup_network_connections() and try_outgoing_connections(). This patch renames setup_network_connections() to setup_network() and moves call to try_outgoing_connections() into main routine. No functional changes.
This commit is contained in:
parent
3308d13e7e
commit
6698f7c390
3 changed files with 8 additions and 7 deletions
|
|
@ -500,13 +500,16 @@ int main2(int argc, char **argv)
|
|||
|
||||
if(!detach())
|
||||
return 1;
|
||||
|
||||
|
||||
/* Setup sockets and open device. */
|
||||
|
||||
if(!setup_network_connections())
|
||||
if(!setup_network())
|
||||
goto end;
|
||||
|
||||
/* Initiate all outgoing connections. */
|
||||
|
||||
try_outgoing_connections();
|
||||
|
||||
/* Start main loop. It only exits when tinc is killed. */
|
||||
|
||||
status = main_loop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue