and needs seeding (even if the seeding itself is predicable)
void mainthread()
{
+ Utility::srandom(time(0) ^ getpid());
+
int newgid=0;
if(!::arg()["setgid"].empty())
newgid=Utility::makeGidNumeric(::arg()["setgid"]);
return newuid;
}
+// Sets the random seed.
+void Utility::srandom( unsigned int seed )
+{
+ ::srandom(seed);
+}
// Writes a vector.
int Utility::writev(int socket, const iovec *vector, size_t count )
//! Writes a vector.
static int writev( Utility::sock_t socket, const iovec *vector, size_t count );
+ //! Sets the random seed.
+ static void srandom( unsigned int seed );
+
//! Drops the program's group privileges.
static void dropGroupPrivs( int uid, int gid );