diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 26b3115b9d..4ea537d956 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -43,6 +43,7 @@ #include #include #include +#include #if HAVE_CAPNG # include @@ -71,6 +72,7 @@ #include "command.h" #include "processinfo.h" #include "nodeinfo.h" +#include "virrandom.h" #define VIR_FROM_THIS VIR_FROM_LXC @@ -1663,7 +1665,8 @@ int main(int argc, char *argv[]) if (setlocale(LC_ALL, "") == NULL || bindtextdomain(PACKAGE, LOCALEDIR) == NULL || - textdomain(PACKAGE) == NULL) { + textdomain(PACKAGE) == NULL || + virRandomInitialize(time(NULL) ^ getpid())) { fprintf(stderr, _("%s: initialization failed\n"), argv[0]); exit(EXIT_FAILURE); }