X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincd.c;h=333a207a9913ee57469ad48ace992f012f85f547;hb=4c30004cb6dc23616d7295b0ce631f066e7f1f82;hp=1feab407283dda960e7fe22bc38534a6005d451a;hpb=1135669b3c6820f5473ea451a58865f552ba768f;p=tinc diff --git a/src/tincd.c b/src/tincd.c index 1feab407..333a207a 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -67,14 +67,18 @@ static bool show_version = false; /* If nonzero, use null ciphers and skip all key exchanges. */ bool bypass_security = false; +#ifdef HAVE_MLOCKALL /* If nonzero, disable swapping for this process. */ static bool do_mlock = false; +#endif +#ifndef HAVE_MINGW /* If nonzero, chroot to netdir after startup. */ static bool do_chroot = false; /* If !NULL, do setuid to given user after startup */ static const char *switchuser = NULL; +#endif /* If nonzero, write log entries to a separate file. */ bool use_logfile = false; @@ -342,7 +346,8 @@ int main(int argc, char **argv) { /* Slllluuuuuuurrrrp! */ - srand(time(NULL)); + gettimeofday(&now, NULL); + srand(now.tv_sec + now.tv_usec); crypto_init(); if(!read_server_config())